-
Notifications
You must be signed in to change notification settings - Fork 46
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
clarify separation of batch vs admin roles #4229
Merged
dmuelle
merged 3 commits into
OpenLiberty:draft
from
scottkurz:clarify-separation-of-batch-vs-admin-roles
May 26, 2021
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also want to clarify- even a user in the reader role can edit batch jobs if they have the proper
com.ibm.ws.batch
auth? I thought that reader role gave you read-only access to the Admin center tools- is that not the case with Java Batch?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this was exactly the nuance I was trying to illustrate. I think it makes sense to basically defer to batch's custom auth here but let me also tag @mbroz2 to clarify if this is truly the intended design.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reader-role is not an Admin Center concept, but rather a Liberty one (aka, it's applied to all (well almost all) APIs, including Admin Center ones, unless the API uses their own set of authorization, like batch).
I would expect a user to be be able to have the 'reader' role and the 'batchAdmin' role, allowing them to view all the tools in admin center, but also perform batch admin job operations in the java batch tool.... but that's only true if no other/non-java-batch APIs are called that would do anything other then a GET operation (except for the Admin Center user preferences API, which is allowed to do POST/PUT/DELETE for reader role). I'm guessing there aren't, but @kinueng or @k8vance88 could confirm. One way to test this would be to just run the Admin Center Java Batch FAT tests, and change the user's role from (what I'm guessing is) admin to reader.
Of course the cheapest route is to simply change the example to asign the batchadmin user to the admin role instead of the reader role :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx @mbroz2. Yeah, if we just want the sample snippet to help a single developer copy/paste working config we probably just want to use the admin role. I don't think you need 'admin' for anything purely batch related but it can be useful e.g. for ibm/api/validation.
I was trying to capture the angle "what is the minimum auth required?" for users trying to use the roles in a fine-grained manner.
Maybe a good compromise would be to show the sample snippet with admin role but mention in a sentence that you can use reader-role for batch operations.