1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.geronimo.ews.ws4j2ee.context.security;
18
19 import javax.security.auth.callback.CallbackHandler;
20 import javax.security.cert.X509Certificate;
21
22 /***
23 * @author Rajith Priyanga (rpriyanga@yahoo.com)
24 * @date Apr 5, 2004
25 * Note: When implementing this should have a reference to the MessageContext
26 */
27 public interface SecurityContext4J2EE {
28 /***
29 * If the integrity of the important elements in the SOAP message is
30 * verified, this will return true. Otherwise false. This is a deployer
31 * dependent test.
32 * If the SOAP request pass this test at the check point this will return true.
33 */
34 public boolean sufficientIntegrity();
35
36 /***
37 * If the privacy of the important elements in the SOAP message is
38 * kept, this will return true. Otherwise false. This is a deployer
39 * dependent test.
40 * If the SOAP request pass this test at the check point this will return true.
41 */
42 public boolean sufficientPrivacy();
43
44 /***
45 * Returns the nonce if speciied at the username token.
46 *
47 * @return nonce. null if it is not mentioned.
48 */
49 public String getNonce();
50
51 /***
52 * Returns the created time if speciied in the username token.
53 *
54 * @return created time. null if it is not mentioned.
55 */
56 public String getCreated();
57
58 /***
59 * Returns true if the password is hashed.
60 *
61 * @return is Password Digested?
62 */
63 public boolean isPasswordDigested();
64
65 /***
66 * Returns the digest value of the password as it appears in the
67 * SOAP message's username token.
68 *
69 * @return password digest.
70 */
71 public char[] getPasswordDigest();
72
73 /***
74 * Returns the password. This is retrieved from the password store
75 * by comparing the username.
76 *
77 * @return actual password of the user.
78 */
79 public char[] getPasswordText();
80
81 /***
82 * Returns the username as appears in the SOAP header.
83 *
84 * @return username.
85 */
86 public String getUsername();
87
88 /***
89 * Returns the X509 certificate. If it is not available in the
90 * SOAP message returns null.
91 *
92 * @return the X509 Certificate.
93 */
94 public X509Certificate getX509Certificate();
95
96 /***
97 * Returns the Kerberose ticket. If it is not available in the
98 * SOAP message returns null.
99 *
100 * @return the X509 Certificate.
101 */
102 public byte[] getKerberoseTicket();
103
104 /***
105 * Returns a PasswordCallbackHandler which can be used in
106 * authentication done using JAAS module at the wrapper web service.
107 *
108 * @return CallbackHandler.
109 */
110 public CallbackHandler getPWDCallbackHandler4J2EE();
111
112 }