Skip to content

Commit 36bd09d

Browse files
committedDec 7, 2019
8233222: Clarify system property usage in KerberosPrincipal instantiation
Reviewed-by: mullan
1 parent 6a547f9 commit 36bd09d

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed
 

‎src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosPrincipal.java

+22-4
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,19 @@ public final class KerberosPrincipal
106106
*
107107
* <p>If the input name does not contain a realm, the default realm
108108
* is used. The default realm can be specified either in a Kerberos
109-
* configuration file or via the java.security.krb5.realm
109+
* configuration file or via the {@systemproperty java.security.krb5.realm}
110110
* system property. For more information, see the
111111
* {@extLink security_guide_jgss_tutorial Kerberos Requirements}.
112-
* Additionally, if a security manager is
112+
*
113+
* <p>Note that when this class or any other Kerberos-related class is
114+
* initially loaded and initialized, it may read and cache the default
115+
* realm from the Kerberos configuration file or via the
116+
* java.security.krb5.realm system property (the value will be empty if
117+
* no default realm is specified), such that any subsequent calls to set
118+
* or change the default realm by setting the java.security.krb5.realm
119+
* system property may be ignored.
120+
*
121+
* <p>Additionally, if a security manager is
113122
* installed, a {@link ServicePermission} must be granted and the service
114123
* principal of the permission must minimally be inside the
115124
* {@code KerberosPrincipal}'s realm. For example, if the result of
@@ -146,10 +155,19 @@ public KerberosPrincipal(String name) {
146155
*
147156
* <p>If the input name does not contain a realm, the default realm
148157
* is used. The default realm can be specified either in a Kerberos
149-
* configuration file or via the java.security.krb5.realm
158+
* configuration file or via the {@systemproperty java.security.krb5.realm}
150159
* system property. For more information, see the
151160
* {@extLink security_guide_jgss_tutorial Kerberos Requirements}.
152-
* Additionally, if a security manager is
161+
*
162+
* <p>Note that when this class or any other Kerberos-related class is
163+
* initially loaded and initialized, it may read and cache the default
164+
* realm from the Kerberos configuration file or via the
165+
* java.security.krb5.realm system property (the value will be empty if
166+
* no default realm is specified), such that any subsequent calls to set
167+
* or change the default realm by setting the java.security.krb5.realm
168+
* system property may be ignored.
169+
*
170+
* <p>Additionally, if a security manager is
153171
* installed, a {@link ServicePermission} must be granted and the service
154172
* principal of the permission must minimally be inside the
155173
* {@code KerberosPrincipal}'s realm. For example, if the result of

0 commit comments

Comments
 (0)
Please sign in to comment.