summaryrefslogtreecommitdiffstats
path: root/auth
diff options
context:
space:
mode:
Diffstat (limited to 'auth')
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java3
-rw-r--r--auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java10
-rw-r--r--auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/OrgLookupFilter.java2
3 files changed, 8 insertions, 7 deletions
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java
index a25c5f31..cbc0737c 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/env/AuthzTransFilter.java
@@ -62,9 +62,10 @@ public class AuthzTransFilter extends TransFilter<AuthzTrans> {
}
@Override
- protected AuthzTrans newTrans() {
+ protected AuthzTrans newTrans(HttpServletRequest req) {
AuthzTrans at = env.newTrans();
at.setLur(getLur());
+ at.set(req);
return at;
}
diff --git a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java
index 1011767a..400c539c 100644
--- a/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java
+++ b/auth/auth-core/src/main/java/org/onap/aaf/auth/rserv/TransFilter.java
@@ -84,22 +84,22 @@ public abstract class TransFilter<TRANS extends TransStore> implements Filter {
return cadi.getLur();
}
- protected abstract TRANS newTrans();
+ protected abstract TRANS newTrans(HttpServletRequest request);
protected abstract TimeTaken start(TRANS trans, ServletRequest request);
protected abstract void authenticated(TRANS trans, Principal p);
protected abstract void tallyHo(TRANS trans);
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
- TRANS trans = newTrans();
+ HttpServletRequest req = (HttpServletRequest)request;
+ HttpServletResponse res = (HttpServletResponse)response;
+
+ TRANS trans = newTrans(req);
TimeTaken overall = start(trans,request);
try {
request.setAttribute(TRANS_TAG, trans);
- HttpServletRequest req = (HttpServletRequest)request;
- HttpServletResponse res = (HttpServletResponse)response;
-
if(no_authn!=null) {
for(String prefix : no_authn) {
if(req.getPathInfo().startsWith(prefix)) {
diff --git a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/OrgLookupFilter.java b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/OrgLookupFilter.java
index 15b71b94..52673431 100644
--- a/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/OrgLookupFilter.java
+++ b/auth/auth-gui/src/main/java/org/onap/aaf/auth/gui/OrgLookupFilter.java
@@ -57,7 +57,7 @@ public class OrgLookupFilter implements Filter {
Identity id;
try {
id = trans.org().getIdentity(trans, p.getName());
- if(id.isFound()) {
+ if(id!=null && id.isFound()) {
return id.firstName();
}
} catch (OrganizationException e) {