Skip to content

Commit 82eb780

Browse files
committedMar 13, 2025
8351349: GSSUtil.createSubject has outdated access control context and policy related text
Reviewed-by: weijun
1 parent c3db667 commit 82eb780

File tree

1 file changed

+26
-28
lines changed
  • src/jdk.security.jgss/share/classes/com/sun/security/jgss

1 file changed

+26
-28
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,8 +30,8 @@
3030
import org.ietf.jgss.GSSCredential;
3131

3232
/**
33-
* GSS-API Utilities for using in conjunction with Sun Microsystem's
34-
* implementation of Java GSS-API.
33+
* GSS-API Utilities for use in conjunction with the JDK implementation
34+
* of Java GSS-API.
3535
*
3636
* @since 1.4
3737
*/
@@ -42,37 +42,35 @@ public class GSSUtil {
4242
private GSSUtil() {}
4343

4444
/**
45-
* Use this method to convert a GSSName and GSSCredential into a
46-
* Subject. Typically this would be done by a server that wants to
47-
* impersonate a client thread at the Java level by setting a client
48-
* Subject in the current access control context. If the server is merely
49-
* interested in using a principal based policy in its local JVM, then
50-
* it only needs to provide the GSSName of the client.
45+
* Use this method to convert a {@code GSSName} and {@code GSSCredential}
46+
* into a {@code Subject}. Typically this would be used by a server that
47+
* wants to impersonate a client.
5148
*
52-
* The elements from the GSSName are placed in the principals set of this
53-
* Subject and those from the GSSCredential are placed in the private
54-
* credentials set of the Subject. Any Kerberos specific elements that
55-
* are added to the subject will be instances of the standard Kerberos
56-
* implementation classes defined in javax.security.auth.kerberos.
49+
* The elements from the {@code GSSName} are placed in the principals set
50+
* of this {@code Subject} and those from the {@code GSSCredential} are
51+
* placed in the private credentials set of the {@code Subject}. Any
52+
* Kerberos specific elements that are added to the subject will be
53+
* instances of the standard Kerberos implementation classes defined in
54+
* {@link javax.security.auth.kerberos}.
5755
*
58-
* @return a Subject with the entries that contain elements from the
59-
* given GSSName and GSSCredential.
56+
* @param principals a {@code GSSName} containing one or more mechanism
57+
* specific representations of the same entity. These mechanism specific
58+
* representations will be populated in the returned {@code Subject}'s
59+
* principal set.
6060
*
61-
* @param principals a GSSName containing one or more mechanism specific
62-
* representations of the same entity. These mechanism specific
63-
* representations will be populated in the returned Subject's principal
64-
* set.
61+
* @param credentials a {@code GSSCredential} containing one or more
62+
* mechanism specific credentials for the same entity. These mechanism
63+
* specific credentials will be populated in the returned {@code Subject}'s
64+
* private credential set. Passing in a value of {@code null} will imply
65+
* that the private credential set should be left empty.
6566
*
66-
* @param credentials a GSSCredential containing one or more mechanism
67-
* specific credentials for the same entity. These mechanism specific
68-
* credentials will be populated in the returned Subject's private
69-
* credential set. Passing in a value of null will imply that the private
70-
* credential set should be left empty.
67+
* @return a {@code Subject} with the entries that contain elements from
68+
* the given {@code GSSName} and {@code GSSCredential}.
7169
*/
7270
public static Subject createSubject(GSSName principals,
73-
GSSCredential credentials) {
71+
GSSCredential credentials) {
7472

75-
return sun.security.jgss.GSSUtil.getSubject(principals,
76-
credentials);
73+
return sun.security.jgss.GSSUtil.getSubject(principals,
74+
credentials);
7775
}
7876
}

0 commit comments

Comments
 (0)
Please sign in to comment.