Skip to content

Commit

Permalink
cadc-util: debug aids
Browse files Browse the repository at this point in the history
  • Loading branch information
pdowler committed Apr 11, 2024
1 parent 91b78cc commit b681a0b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cadc-util/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sourceCompatibility = 1.8

group = 'org.opencadc'

version = '1.11.1'
version = '1.11.2'

description = 'OpenCADC core utility library'
def git_url = 'https://github.com/opencadc/core'
Expand Down
19 changes: 10 additions & 9 deletions cadc-util/src/main/java/ca/nrc/cadc/auth/AuthenticationUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,20 +182,20 @@ private static Authenticator getAuthenticator(IdentityManager im) {
public static Subject augmentSubject(Subject s) {
IdentityManager auth = getIdentityManager();
// temporary backwards compat
Authenticator alt = getAuthenticator(auth);
if (alt != null) {
return alt.augment(s);
}
//Authenticator alt = getAuthenticator(auth);
//if (alt != null) {
// return alt.augment(s);
//}
return auth.augment(s);
}

public static Subject validateSubject(Subject s) throws NotAuthenticatedException {
IdentityManager auth = getIdentityManager();
// temporary backwards compat
Authenticator alt = getAuthenticator(auth);
if (alt != null) {
return alt.validate(s);
}
//Authenticator alt = getAuthenticator(auth);
//if (alt != null) {
// return alt.validate(s);
//}
return auth.validate(s);
}

Expand Down Expand Up @@ -344,8 +344,9 @@ public static Subject getSubject(PrincipalExtractor principalExtractor, boolean
}
setAuthMethod(subject, am);
if (augmentSubject) {
return augmentSubject(subject);
subject = augmentSubject(subject);
}
log.debug("getSubject(augment=" + augmentSubject + "): " + subject);
return subject;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ public int compareTo(PosixPrincipal t) {

@Override
public String toString() {
return "PosixPrincipal [uidNumber=" + uidNumber + "]";
return "PosixPrincipal [uidNumber=" + uidNumber + "," + defaultGroup + "," + username + "]";
}
}

0 comments on commit b681a0b

Please sign in to comment.