summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.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-18 13:59:26 -0500
commitdb56da6d015d4fc040d73277c68fea590c5929b7 (patch)
tree686932298bfce30d8cdd10622f4b0fc51b554250 /base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.java
parentdd01437171044ecb4cdc63998250a4d9f3277119 (diff)
downloadpki-db56da6d015d4fc040d73277c68fea590c5929b7.tar.gz
pki-db56da6d015d4fc040d73277c68fea590c5929b7.tar.xz
pki-db56da6d015d4fc040d73277c68fea590c5929b7.zip
Added authentication method validation.ticket-477-7
A new mechanism has been added to specify the authentication methods that can be used to invoke the REST methods. The AuthMethodMapping annotation maps each REST method to a list of allowed authentication methods. When a client calls a REST method, the AuthMethodInterceptor will intercept the call and verify that the client uses an allowed authentication method. 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 the installation token from security domain. Ticket #477
Diffstat (limited to 'base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.java')
-rw-r--r--base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.java b/base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.java
new file mode 100644
index 000000000..6170c0f9b
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/authentication/AuthMethodMapping.java
@@ -0,0 +1,31 @@
+// --- BEGIN COPYRIGHT BLOCK ---
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// (C) 2013 Red Hat, Inc.
+// All rights reserved.
+// --- END COPYRIGHT BLOCK ---
+
+package com.netscape.certsrv.authentication;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+
+/**
+ * @author Endi S. Dewata
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AuthMethodMapping {
+ public String value();
+}