summaryrefslogtreecommitdiffstats
path: root/base/tks/src/com/netscape/tks/TKSApplication.java
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2013-02-01 13:05:38 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2013-02-03 00:53:42 -0500
commit154bb05e9bbd45eaa3ca8bef8d2a6af076b1790c (patch)
tree67f4ede6b83daf696fc211e696d83327134e4a4a /base/tks/src/com/netscape/tks/TKSApplication.java
parent2ea42ce4cf91053bc91e5722abeb259cd0577510 (diff)
downloadpki-ticket-474-7.tar.gz
pki-ticket-474-7.tar.xz
pki-ticket-474-7.zip
Added AuthMapping annotation.ticket-477-3ticket-474-7
A new AuthMapping annotation has been added to configure the required authentication methods to acces each REST method. The annotation maps each method into a list of authentication methods in auth.properties. For security reason, most REST methods that require authentication have been configured to require client certificate authentication. Authentication using username and password will only be used to get installation token from the security domain. Previously the auth.properties files were used to store ACL mappings. Now the ACL mappings have been moved into acl.properties. Ticket #477
Diffstat (limited to 'base/tks/src/com/netscape/tks/TKSApplication.java')
-rw-r--r--base/tks/src/com/netscape/tks/TKSApplication.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/tks/src/com/netscape/tks/TKSApplication.java b/base/tks/src/com/netscape/tks/TKSApplication.java
index 229a64c95..c79e0d0f2 100644
--- a/base/tks/src/com/netscape/tks/TKSApplication.java
+++ b/base/tks/src/com/netscape/tks/TKSApplication.java
@@ -6,6 +6,7 @@ import java.util.Set;
import javax.ws.rs.core.Application;
import com.netscape.certsrv.acls.ACLInterceptor;
+import com.netscape.certsrv.authentication.AuthInterceptor;
import com.netscape.certsrv.base.PKIException;
import com.netscape.cms.servlet.account.AccountService;
import com.netscape.cms.servlet.admin.GroupMemberService;
@@ -40,7 +41,8 @@ public class TKSApplication extends Application {
// exception mapper
classes.add(PKIException.Mapper.class);
- // ACL interceptor
+ // interceptors
+ singletons.add(new AuthInterceptor());
singletons.add(new ACLInterceptor());
}