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

Support configurable OSM OAuth2 scope #1065

Merged
merged 1 commit into from
Sep 6, 2023
Merged

Conversation

ljdelight
Copy link
Contributor

This allows for customization of the OSM OAuth2 scope via the conf (osm.oauth2Scope) or an environment variable (MR_OSM_OAUTH2SCOPE). At times the oauth2 scope needs reduced, for example a local dev or staging environment, to avoid accidentally publishing test data to OSM.

This allows for customization of the OSM OAuth2 scope via the conf (osm.oauth2Scope) or an environment variable (MR_OSM_OAUTH2SCOPE).
At times the oauth2 scope needs reduced, for example a local dev or staging environment, to avoid accidentally publishing test data to OSM.
@sonarcloud
Copy link

sonarcloud bot commented Sep 6, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ljdelight
Copy link
Contributor Author

ljdelight commented Sep 6, 2023

On a test instance I verified that setting osm.oauth2Scope = "read_prefs" does have a functional maproulette experience.

When the write to the user's pref is not allowed (to update the maproulette api key on the user's osm profile), this log message will be generated when logging in:

INFO  controllers.AuthController - API key unsuccessfully stored in OSM preferences for user id 3. Status code 403

@ljdelight ljdelight merged commit 81ba5cf into dev Sep 6, 2023
7 checks passed
@ljdelight ljdelight deleted the ljdelight/confOauth2Scope branch September 6, 2023 04:54
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.

1 participant