-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Feature-1816: Metacat Admin MN Privileges (auth.administrators) #1819
Feature-1816: Metacat Admin MN Privileges (auth.administrators) #1819
Conversation
… also check if session subject is a Metacat admin to determine MN node admin privileges
LGTM. With some mocking, I think it might be possible to add some test cases in the existign class? ? |
After reviewing the That being said - I have tested locally and my code change are working as expected with a valid token/auth.admin (manually adding my |
@doulikecookiedough I agree with @artntek. It is good time to add a test for this method. We can use Mock or even without Mock to archive testing. This testing shouldn't be very hard and it can be a chance to get familiar with the code space. |
Understood @taojing2002! I will work on adding a test for this new change. |
Thank you, Dou!
…On Tue, Mar 5, 2024 at 2:36 PM Dou Mok ***@***.***> wrote:
Understood @taojing2002 <https://github.com/taojing2002>! I will work on
adding a test for this new change.
—
Reply to this email directly, view it on GitHub
<#1819 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB5QQDGDN2555HFLOLAS6O3YWZCIDAVCNFSM6AAAAABEGGPSBWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZZG42TINRQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…thorization' and update test.properties
@taojing2002 I've added tests for the code change to the |
Network dependencies have been introduced in |
…ize new 'authDelMock' to eliminate network dependencies
…or authMN Node reference and add a new test & assert statements for 'isAuthoritativeMNodeAdmin' test method
…eAdmin' and new test for valid admin scenario
…tion for expected exception
Thank you @artntek for reviewing my changes. I've added a Mock which I believe has eliminated the network dependencies. I've also cleaned up the existing tests & added javadocs, implemented some missing tests & removed redundant ones and added a few new tests. Please let me know if you have any other feedback (and @taojing2002 as well). Notes: I have not implemented the test for
|
Thank you @artntek (and for the nudge to resolve my IDE issues)! |
Summary of Changes:
doAdminAuthorization
method inD1Authhelper.java
class to also check whether session subject is a Metacat admin user (part of the auth.administrators list) to determine MN Node access privileges.Hi @taojing2002 - When you have a moment, can you please review my PR? @artntek If you have a moment, your feedback is welcome too.