-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement Authorization #1037
Comments
This commit will add the api_key column to the user model and turn on authorized requests for WillowSword. To give a user access, do something like the following: ```rb u = User.find_by(email: 'some_user@example.com') u.api_key = eSecureRandom.uuid u.save! ``` Ref: - https://github.com/CottageLabs/willow_sword/wiki/Enabling-Authorization-In-Willow-Sword - notch8/palni-palci#1037
This commit will add the api_key column to the user model and turn on authorized requests for WillowSword. To give a user access, do something like the following: ```rb u = User.find_by(email: 'some_user@example.com') u.api_key = SecureRandom.uuid u.save! ``` Ref: - https://github.com/CottageLabs/willow_sword/wiki/Enabling-Authorization-In-Willow-Sword - notch8/palni-palci#1037
@kirkkwang Does this need to be QA'd? If so, could you please include testing instructions? Thanks! |
@ShanaLMoore Got it, added some instructions. |
QA Results: Pass ✅Tested by sending the curl request from my terminal to pals knapsack staging. With NO API Key ✅The request did not have an API key, so I was denied: With API Key: ✅Request was successful: |
To whoever is QA'ing this, please contact me on slack so I can set up your user with an API key |
QA Results: Pass ✅Confirmed Not Authorized without the key at https://demo.palni-palci-staging.notch8.cloud/sword/service_document . Confirmed successful service document with an authorized key. The |
This gets deployed with the knapsack cutover |
Story
Currently, WillowSword is unprotected and allows anyone to deposit. We must implement authorization before rolling this feature out.
https://github.com/CottageLabs/willow_sword/wiki/Enabling-Authorization-In-Willow-Sword
Acceptance Criteria
Testing Instructions
In your terminal send this request:
You should see and error because no API key was sent with the request.
See Kirk for API-key, and retest with the API-key, it should now succeed.
The text was updated successfully, but these errors were encountered: