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

Add create and last used timestamps for API Keys #362

Closed
37b opened this issue Apr 9, 2022 · 0 comments · Fixed by #537
Closed

Add create and last used timestamps for API Keys #362

37b opened this issue Apr 9, 2022 · 0 comments · Fixed by #537
Milestone

Comments

@37b
Copy link

37b commented Apr 9, 2022

Current Behavior in Dependency Track:

The /team API returns a list of API Keys assigned to a team, but does not provide a timestamp for when each key was created or last accessed. This information is needed to enforce API Key rotation schemas.

...
"apiKeys": [
{
"key": "string"
}
]
Proposed Behavior:

...
"apiKeys": [
{
"key": "string",
"createdAt": "2021-06-09T18:18:21.710Z",
"lastUsed": "2021-06-09T18:18:21.710Z"
}
]

@stevespringett stevespringett added this to the 2.0 milestone Apr 10, 2022
nscuro added a commit to nscuro/Alpine that referenced this issue Jan 11, 2024
In order to avoid introducing additional latency to requests, API key usage is buffered in-memory and asynchronously flushed to the database in intervals of 30s.

An API key counts as "used" if authentication with it succeeds.

Also, add support for an optional comment for API keys, as requested in stevespringett#536.

Closes stevespringett#362
Closes stevespringett#536

Signed-off-by: nscuro <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants