feat: allow api key for cavern user allocation access#256
Merged
pdowler merged 14 commits intoopencadc:mainfrom Aug 22, 2025
Merged
feat: allow api key for cavern user allocation access#256pdowler merged 14 commits intoopencadc:mainfrom
pdowler merged 14 commits intoopencadc:mainfrom
Conversation
Member
Author
|
Depends on |
…ction to properly report through rest servlet
… user-allocation
pdowler
requested changes
Aug 13, 2025
cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java
Outdated
Show resolved
Hide resolved
cadc-vos-server/src/main/java/org/opencadc/vospace/server/NodePersistence.java
Outdated
Show resolved
Hide resolved
cavern/src/main/java/org/opencadc/cavern/nodes/PosixIdentityManager.java
Outdated
Show resolved
Hide resolved
Member
Author
|
Rework is ready for review. No changes needed to |
pdowler
requested changes
Aug 21, 2025
|
|
||
| // must be hard coded to this and not set via java system properties | ||
| this.identityManager = new PosixIdentityManager(); | ||
| final IdentityManager configuredIdentityManager = AuthenticationUtil.getIdentityManager(); |
Member
There was a problem hiding this comment.
This is simply a check that init did the setup correctly. The error should not be exposed to operators as a failure here is a bug, not a config issue. Instead: just catch the possible ClasscastException at line 172, eg:
try {
this.identityManager = (PosixIdentityManager) AuthenticationUtil.getIdentityManager();
} catch (ClasscastException ex) {
throw new RuntimeException("BUG: init failed to wrap IdentityManager with PosixIdentityManager", ex);
}
Yeah, I literally put "BUG" in the error message :-)
cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java
Outdated
Show resolved
Hide resolved
|
|
||
| @Override | ||
| public void doInit() { | ||
| initIdentityManager(); |
Member
There was a problem hiding this comment.
initIdentityManager needs to be called after initNodePersistence because it needs a value of jndiNodePersistence
cavern/src/main/java/org/opencadc/cavern/nodes/FileSystemNodePersistence.java
Outdated
Show resolved
Hide resolved
pdowler
approved these changes
Aug 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Allow an
api-keyAuthorization header when performing a User Allocation administrative task. Also ensure a default quota is set on new allocations.Changes