Skip to content
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

Some admin tools fails with 403 #163

Open
vjrj opened this issue Oct 7, 2021 · 4 comments
Open

Some admin tools fails with 403 #163

vjrj opened this issue Oct 7, 2021 · 4 comments

Comments

@vjrj
Copy link
Contributor

vjrj commented Oct 7, 2021

@jloomisVCE and me just discovered that many admin tools fails with a 403 error and some error like:

2021-10-07 16:41:09.061  WARN --- [nio-9101-exec-4] a.org.ala.ws.security.ApiKeyInterceptor  : Non-authorised IP address - X.X.X.X

See screenshot:

image (7)

Adding the IP to the whitelist variable did not solve the issue. The user has the ROLE_ADMIN role and the ROLE_IMAGE_ADMIN

Tested with image-service 1.1.5.1 and 1.1.7.1.

Sounds like a bug more than a config issue? Any tip?

@vjrj
Copy link
Contributor Author

vjrj commented Oct 7, 2021

Maybe it's an authorization error in userdetails, @jloomisVCE can you check if your image-service IP is allowed to get user details?

https://github.com/AtlasOfLivingAustralia/documentation/wiki/Secure-your-LA-infrastructure#allowlist-ip-address

@vjrj
Copy link
Contributor Author

vjrj commented Oct 7, 2021

I ask myself, in my test environment, is allowed and still fails with 403:

image

@vjrj
Copy link
Contributor Author

vjrj commented Oct 7, 2021

If helps, reindexImages works:


but scheduleArtifactGeneration and other admin tools (like scheduleKeywordRegeneration) fails with 403:
@AlaSecured(value = [CASRoles.ROLE_ADMIN], anyRole = true, redirectUri = "/")

@vjrj
Copy link
Contributor Author

vjrj commented Oct 7, 2021

Maybe the key is a collision between the api calls that require an apikey and the /admin UI calls

image

sorry for the verbosity.

PS: curl calls with an ApiKey works:

curl -X POST https://images.vtatlasoflife.org/ws/scheduleArtifactGeneration/0b2af3c3-3c8c-4e49-8014-ffa367cb266c -H "apiKey: SOME-VALID-API-KEY" 

{"success":true,"message":"Image artifact generation scheduled for image 862245"}%  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant