Skip to content

Conversation

@cesnietor
Copy link
Collaborator

as part of #922.
This api will be used to show the max value in the UI.
The value cannot be fetched in the UI code from the cookie since it has HTTPOnly flag and with that, the cookie can't be fetched. (is a security feature)

GET to <host>/api/v1/buckets/max-share-exp
Response comes like:

{
    "exp": 3600
}

Test Steps:

  • Set env variable CONSOLE_STS_DURATION value to 1h or 24h
  • Run server like:
make && CONSOLE_ACCESS_KEY=minioconsole
CONSOLE_SECRET_KEY=minioconsole
CONSOLE_MINIO_SERVER=http://localhost:9000
CONSOLE_DEV_MODE=on CONSOLE_STS_DURATION=1h./console server
  • Authenticate on login api
  • Call api
  • response should include value in seconds

Test with an unauthenticated user and it should return an access denied response.

@bexsoft bexsoft merged commit 1767a37 into minio:master Oct 19, 2023
cesnietor added a commit to cesnietor/console that referenced this pull request Jan 12, 2024
cesnietor added a commit to cesnietor/console that referenced this pull request Jan 12, 2024
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.

3 participants