Skip to content

Commit

Permalink
update cadc-util dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
pdowler committed Sep 19, 2023
1 parent 5c0aaa0 commit aebe558
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cadc-access-control-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sourceCompatibility = 1.8

group = 'org.opencadc'

version = '1.3.32'
version = '1.3.33'

description = 'OpenCADC User+Group server library'
def git_url = 'https://github.com/opencadc/ac'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,11 @@ public User getAugmentedUser(final Principal userID, final boolean primeGroupCac
if (uidNumberString != null)
{
user.getIdentities().add(new PosixPrincipal(Integer.valueOf(uidNumberString)));
}
// HACK by pdowler: add posix details to augment
int uidNumber = Integer.parseInt(uidNumberString);
// home dir hack because it's required but not used
user.posixDetails = new PosixDetails(username, uidNumber, uidNumber, "/home/" + uidNumber);
}

// cache memberOf values in the user
LocalAuthority localAuthority = new LocalAuthority();
Expand Down
4 changes: 2 additions & 2 deletions cadc-access-control/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sourceCompatibility = 1.8

group = 'org.opencadc'

version = '1.1.26'
version = '1.1.27'

description = 'OpenCADC User+Group client library'
def git_url = 'https://github.com/opencadc/ac'
Expand All @@ -25,7 +25,7 @@ dependencies {
compile 'org.jdom:jdom2:[2.0.6,3.0)'
compile 'org.json:json:20160212'

compile 'org.opencadc:cadc-util:[1.6,2.0)'
compile 'org.opencadc:cadc-util:[1.9.11,2.0)'
compile 'org.opencadc:cadc-registry:[1.5,2.0)'
compile 'org.opencadc:cadc-gms:[1.0.5,1.1)'
compile 'org.opencadc:cadc-cdp:[1.0,2.0)'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public void augmentSubject(Subject subject) throws MalformedURLException

String userID = principal.getName();
String path = "/" + NetUtil.encode(userID) + "?idType=" + this
.getIdType(principal) + "&detail=identity";
.getIdType(principal); // "&detail=identity";

// augment subject calls are always https with client certs
URL usersURL = getRegistryClient()
Expand Down Expand Up @@ -408,6 +408,16 @@ protected Set<Principal> getPrincipals(ByteArrayOutputStream out)
log.debug("userXML Input to getPrincipals(): " + userXML);

User user = new UserReader().read(userXML);

// PROTO: include minimal posiz info in PosixPrincipal
if (user.posixDetails != null) {
for (PosixPrincipal pp : user.getIdentities(PosixPrincipal.class)) {
if (pp.getUidNumber() == user.posixDetails.getUid()) {
pp.defaultGroup = user.posixDetails.getGid();
pp.username = user.posixDetails.getUsername();
}
}
}
return user.getIdentities();
}
catch (Exception e)
Expand Down

0 comments on commit aebe558

Please sign in to comment.