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

MODINVSTOR-1237: Don't warn about expected 403 from user-tenant #1051

Merged
merged 2 commits into from
Aug 5, 2024

Conversation

julianladisch
Copy link
Contributor

https://folio-org.atlassian.net/browse/MODINVSTOR-1237

See https://folio-org.atlassian.net/browse/MODINVSTOR-1114 why it is expected that ConsortiumDataCache gets a 403 response when calling /user-tenants.

That 403 causes this log entry:

WARN ConsortiumDataCache loadConsortiumData:: Error loading consortium data, tenantId: 'diku' response status: '403', body: 'Access for user 'diku_admin' (2579bfce-29bd-435a-bac6-5e1b95588e31) requires permission: user-tenants.collection.get'

Warning about an expected 403 is misleading.

Solution:

INFO ConsortiumDataCache loadConsortiumData:: Skipping for tenant diku because /user-tenants?limit=1 returns 403 (forbidden)

Purpose

Don't warn about the expected 403 from user-tenant.

Approach

Convert warning into info log entry.

Changes Checklist

  • API Changes: Document any API paths, methods, request or response bodies changed, added, or removed.
  • Database Schema Changes: Indicate any database schema changes and their impact. Confirm that migration scripts were created.
  • Interface Version Changes: Indicate any changes to interface versions.
  • Interface Dependencies: Document added or removed dependencies.
  • Permissions: Document any changes to permissions.
  • Logging: Confirm that logging is appropriately handled.
  • Unit Testing: Confirm that changed classes were covered by unit tests.
  • Integration Testing: Confirm that changed logic was covered by integration tests.
  • Manual Testing: Confirm that changes were tested on local or dev environment.
  • NEWS: Confirm that the NEWS file is updated with relevant information about the changes made in this pull request.

Related Issues

https://folio-org.atlassian.net/browse/MODINVSTOR-1237

…ants

https://folio-org.atlassian.net/browse/MODINVSTOR-1237

See https://folio-org.atlassian.net/browse/MODINVSTOR-1114
why it is expected that ConsortiumDataCache gets a 403 response when calling /user-tenants.

That 403 causes this log entry:

`WARN ConsortiumDataCache loadConsortiumData:: Error loading consortium data, tenantId: 'diku' response status: '403', body: 'Access for user 'diku_admin' (2579bfce-29bd-435a-bac6-5e1b95588e31) requires permission: user-tenants.collection.get'`

Warning about an expected 403 is misleading.

Solution:

INFO ConsortiumDataCache loadConsortiumData:: Skipping for tenant diku because /user-tenants?limit=1 returns 403 (forbidden)
Copy link

sonarqubecloud bot commented Aug 5, 2024

@julianladisch julianladisch merged commit 5d3e753 into master Aug 5, 2024
6 checks passed
@julianladisch julianladisch deleted the MODINVSTOR-1237-user-tenants-403 branch August 5, 2024 12:52
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

Successfully merging this pull request may close these issues.

3 participants