[Extensions] Authenticate and authorize from service account token #2703
Labels
enhancement
New feature or request
triaged
Issues labeled as 'Triaged' have been reviewed and are deemed actionable.
As a part of handling service accounts, we first refactored how internal users were represented in the code and then added a mechanism to generate an auth token representing the Basic Auth credentials of a service account. The flow diagram can be found here.
As the next step in this flow, we need to be able to authenticate and authorize based on these tokens. In the diagram, we can see that the request is expected to return to the security plugin attempting to execute its operation. To handle this, code will need to be added in the security plugin to parse the token received as a part of the request. We will then need to verify it is the correct token by decrypting it for the encoded service account name and password. The password can then be hashed and compared to the stored hash of the service account.
This flow is almost identical to a normal basic auth flow but we use the token to pass the credentials instead of encoding the information as part of the URI.
Code changes for this issue can be added to the normal REST request handler but should look for a token which matches the specification of the tokens created in #2697.
Completion of this issue will look like a PR which introduces the code changes to add this logic to the security plugin as well as associated tests. Tests can make use of the previous test format added in the
UserAPITest
class.The text was updated successfully, but these errors were encountered: