summaryrefslogtreecommitdiffstats
path: root/auth/auth-service/src/main
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2019-09-03 12:31:32 -0500
committerInstrumental <jonathan.gathman@att.com>2019-09-03 13:04:31 -0500
commit6309ef454e6960d95d13534645e1f15904de6862 (patch)
tree50086c164436cf2e65c8eb9a90180b1d4a34bbbc /auth/auth-service/src/main
parentc3b26083686b22724767c4056735d425e4360d0e (diff)
Update Fixes from testing
Issue-ID: AAF-961 Change-Id: I142e460607bf32a785037fa2360b1c0efc3948b1 Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-service/src/main')
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Perms.java6
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Roles.java5
-rw-r--r--auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_User.java5
3 files changed, 12 insertions, 4 deletions
diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Perms.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Perms.java
index ae94553c..04654d47 100644
--- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Perms.java
+++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Perms.java
@@ -232,8 +232,10 @@ public class API_Perms {
HttpServletRequest req,
HttpServletResponse resp) throws Exception {
- Result<Void> r = context.renamePerm(trans, req, resp, pathParam(req, "type"),
- pathParam(req, "instance"), pathParam(req, "action"));
+ Result<Void> r = context.renamePerm(trans, req, resp,
+ pathParam(req, "type"),
+ URLDecoder.decode(pathParam(req, "instance"),Config.UTF_8),
+ pathParam(req, "action"));
switch(r.status) {
case OK:
resp.setStatus(HttpStatus.OK_200);
diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Roles.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Roles.java
index 2c93bc38..6088dd36 100644
--- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Roles.java
+++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_Roles.java
@@ -27,6 +27,8 @@ import static org.onap.aaf.auth.rserv.HttpMethods.GET;
import static org.onap.aaf.auth.rserv.HttpMethods.POST;
import static org.onap.aaf.auth.rserv.HttpMethods.PUT;
+import java.net.URLDecoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -38,6 +40,7 @@ import org.onap.aaf.auth.service.AAF_Service;
import org.onap.aaf.auth.service.Code;
import org.onap.aaf.auth.service.facade.AuthzFacade;
import org.onap.aaf.auth.service.mapper.Mapper.API;
+import org.onap.aaf.cadi.config.Config;
public class API_Roles {
public static void init(AAF_Service authzAPI, AuthzFacade facade) throws Exception {
@@ -231,7 +234,7 @@ public class API_Roles {
Result<Void> r = context.getRolesByPerm(trans, resp,
pathParam(req, "type"),
- pathParam(req, "instance"),
+ URLDecoder.decode(pathParam(req, "instance"),Config.UTF_8),
pathParam(req, "action"));
switch(r.status) {
case OK:
diff --git a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_User.java b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_User.java
index 0ce1dfe2..d5ce00c3 100644
--- a/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_User.java
+++ b/auth/auth-service/src/main/java/org/onap/aaf/auth/service/api/API_User.java
@@ -24,6 +24,8 @@ package org.onap.aaf.auth.service.api;
import static org.onap.aaf.auth.layer.Result.OK;
import static org.onap.aaf.auth.rserv.HttpMethods.GET;
+import java.net.URLDecoder;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -34,6 +36,7 @@ import org.onap.aaf.auth.service.AAF_Service;
import org.onap.aaf.auth.service.Code;
import org.onap.aaf.auth.service.facade.AuthzFacade;
import org.onap.aaf.auth.service.mapper.Mapper.API;
+import org.onap.aaf.cadi.config.Config;
/**
* User Role APIs
@@ -61,7 +64,7 @@ public class API_User {
//
Result<Void> r = context.getUsersByPermission(trans, resp,
pathParam(req, ":type"),
- pathParam(req, ":instance"),
+ URLDecoder.decode(pathParam(req, ":instance"),Config.UTF_8),
pathParam(req, ":action"));
switch(r.status) {
case OK: