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

[QA]tests for auth-app token generation via API and cli #10619

Open
6 of 22 tasks
ScharfViktor opened this issue Nov 21, 2024 · 3 comments
Open
6 of 22 tasks

[QA]tests for auth-app token generation via API and cli #10619

ScharfViktor opened this issue Nov 21, 2024 · 3 comments
Assignees
Labels

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Nov 21, 2024

related: #9755
docs task: #10605

Note

Creatiing app token:
POST https://localhost:9200/auth-app/tokens?expiry=24h

  • this returns the actual token (save to use it later - cannot be accessed later on)

List app tokens:
GET https://localhost:9200/auth-app/tokens

  • this returns list of tokens with id (NOT actual token value)

we need to have api tests for that and cli test

Bugs

Test Cases

API

Impersonation

CLI

Use of Token

  • resource access using own app token
  • access resource of another user using impersonation token
  • try to access resource of another user using own token
  • check if token expires

cc @saw-jan

@nirajacharya2
Copy link
Contributor

need to confirm how to delete the tokens.
#10675

@nirajacharya2
Copy link
Contributor

need to confirm how to delete the tokens. #10675

skipping delete test.

@saw-jan
Copy link
Member

saw-jan commented Jan 17, 2025

@nirajacharya2 I have update the description. Please, have a look

TL;DR: token return by creation request is the actual token, and the token returned by list request is the token id. So, use actula token for resource access and token-id for token deletion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants