-
Notifications
You must be signed in to change notification settings - Fork 69
Remove Data Analytics Framework token authentication via GET/POST params. #2028
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
Open
aaronweeden
wants to merge
15
commits into
ubccr:xdmod11.0.1-access
Choose a base branch
from
aaronweeden:update-daf-logging
base: xdmod11.0.1-access
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Remove Data Analytics Framework token authentication via GET/POST params. #2028
aaronweeden
wants to merge
15
commits into
ubccr:xdmod11.0.1-access
from
aaronweeden:update-daf-logging
Conversation
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
611dd3f
to
6f032db
Compare
Is this going to cause breakage / incompatibility between newer XDMoD and older python code? |
No, every release of |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Category: Data Analytics Framework
maintenance / code quality
Improvements and code cleanup. Not a new feature or enhancement to existing functionality.
php
Pull requests that update Php code
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.
Description
This PR removes the ability to authenticate to the Data Analytics Framework REST API via API token in GET or POST parameters and makes it so the token must be provided via
Authorization
header. The GET/POST param functionality was in place for CentOS 7 to work around theAuthorization
header being eaten by Apache, and it is no longer needed.These changes mean the current method of counting Data Analytics Framework requests for our reporting KPIs will no longer work (they involved reading the logs with
ident = 'rest.logger.db' or ident = 'controller.log'
and searching for theBearer
parameter). To correct this, this PR adds logging with a newident = 'daf'
.This PR also updates the error messages and documentation to use consistent lowercasing of "token" and to move the duplicate error message strings into variables.
This PR also refactors some duplicated code into functions.
There is also a PR for https://github.com/ubccr/xdmod-xsede/pull/570.
Motivation and Context
Code cleanup and better practice not to have the API token in the request parameters.
Tests performed
This PR updates the token auth integration tests.
In a Docker container with the changes from this PR, I also made requests via the version of
xdmod-data
from ubccr/xdmod-data#68 and confirmed the logs appeared as expected, e.g.,:Checklist: