New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAYARA-2627 remove X500 class #3187

Merged
merged 5 commits into from Oct 4, 2018

Conversation

Projects
None yet
5 participants
@Cousjava
Member

Cousjava commented Sep 21, 2018

No description provided.

smillidge and others added some commits Apr 8, 2018

@Cousjava Cousjava added this to the Payara 5.184 milestone Sep 21, 2018

@Cousjava Cousjava requested review from smillidge and arjantijms Sep 21, 2018

@Cousjava

This comment has been minimized.

Member

Cousjava commented Sep 21, 2018

Jenkins test please

@payara-ci

This comment has been minimized.

Contributor

payara-ci commented Sep 21, 2018

Quick build and test passed!

// Set the transport principal in subject and
// return the X500Principal class
securityContext = new SecurityContext();
X500Principal x500Name = (X500Principal) certChain[0].getSubjectX500Principal();

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

X500Principal x500principal

@@ -207,7 +208,7 @@ public static void doX500Login(Subject subject, String appModuleID) throws Login
String user = null;
String realmName = null;
try {
X500Name x500name = getPublicCredentials(subject, X500Name.class);
X500Principal x500name = (X500Principal)getPublicCredentials(subject, X500Principal.class);

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

X500Principal x500Name

Plus, is cast needed?

@@ -132,70 +132,69 @@ protected void init(Properties props) throws BadRealmException, NoSuchRealmExcep
* @return Description of the kind of authentication that is directly supported by this realm.
*/
@Override
public String getAuthType() {
public String getAuthType()
{

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

Weird bracing

public void authenticate(Subject subject, X500Name x500name) {
public void authenticate(Subject subject, X500Principal x500name)
{

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

Weird bracing

*
* @param subject The Subject object for the authentication request.
* @param x500name The X500Name object from the user certificate.
*
*/
public void authenticate(Subject subject, X500Name x500name) {
public void authenticate(Subject subject, X500Principal x500name)

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

X500Principal x500Principal

if (!subject.getPrincipals().isEmpty()) {
subject.getPublicCredentials().add(new DistinguishedPrincipalCredential(x500name));
DistinguishedPrincipalCredential dpc = new DistinguishedPrincipalCredential(x500name);

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

Don't use names like dpc, agy, opo, etc

In this case the intermediate variable also isn't really needed.

v.add(groups[i]);
}
private void setGroupNames(String username, String[] groups)
{

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

Weird bracing

}
private void setGroupNames(String username, String[] groups)
{
LinkedList v = new LinkedList();

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

Avoid names like v, z, o, etc.

}
}
grpList = addAssignGroups(grpList);
grpList = this.addMappedGroupNames(grpList);
setGroupNames(_username, grpList);
if (_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE, "LDAP: login succeeded for: " + _username);
if(_logger.isLoggable(Level.FINE)){

This comment has been minimized.

@arjantijms

arjantijms Sep 27, 2018

Member

formatting; needs spaces

@Cousjava

This comment has been minimized.

Member

Cousjava commented Sep 28, 2018

Jenkins test please

@payara-ci

This comment has been minimized.

Contributor

payara-ci commented Sep 28, 2018

Quick build and test failed!

@smillidge

This comment has been minimized.

Contributor

smillidge commented Oct 1, 2018

jenkins test please

@payara-ci

This comment has been minimized.

Contributor

payara-ci commented Oct 1, 2018

Quick build and test failed!

@Cousjava

This comment has been minimized.

Member

Cousjava commented Oct 2, 2018

Jenkins test please

@payara-ci

This comment has been minimized.

Contributor

payara-ci commented Oct 2, 2018

Quick build and test passed!

Changes made

@Pandrex247

This comment has been minimized.

Member

Pandrex247 commented Oct 4, 2018

Jenkins test please

@payara-ci

This comment has been minimized.

Contributor

payara-ci commented Oct 4, 2018

Quick build and test passed!

@Pandrex247 Pandrex247 merged commit a5ad2fb into payara:master Oct 4, 2018

3 checks passed

Payara Quick Build Payara quick build passed!
Details
Payara Quick Build and Test Quick build and test passed!
Details
Payara Quick Test Payara quick tests passed!
Details

Cousjava added a commit to Cousjava/Payara that referenced this pull request Oct 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment