inveniosoftware / invenio-app-rdm

Turn-key research data management platform.
https://inveniordm.docs.cern.ch
MIT License
108 stars 149 forks source link

Implement Expiration and Revocation Options for API Keys #2844

Open Samk13 opened 2 months ago

Samk13 commented 2 months ago

Is your feature request related to a problem? Please describe.

Yes! :) Our security team has identified a risk where users could unintentionally submit their API keys on GitHub and other platforms. This would exposes the system to serious vulnerabilities, particularly if the user holds high privileges, potentially compromising security for an indefinite period.

Describe the solution you'd like

Introduce functionality within Invenio to enhance API key security by:

These features should be accessible from both user and admin interfaces to assert comprehensive control over API key management.

Describe alternatives you've considered

Manual Monitoring: Relying on manual monitoring of API key usage to detect and revoke compromised keys. However, this approach is reactive and inefficient. Short-Lived Tokens: Implementing short-lived tokens that require frequent renewal. While this increases security, it may negatively impact user experience due to the need for constant updates.

Additional context

During a recent meeting with the security team, it was highlighted that the accidental exposure of API keys poses a severe risk to our system's integrity. Implementing expiration and revocation features will significantly mitigate this risk by ensuring that compromised keys cannot be used indefinitely. Additionally, providing these options at both user and admin levels will enhance our overall security posture and provide flexibility in managing API access.

Related Issues:

https://github.com/inveniosoftware/invenio-oauth2server/issues/53 https://github.com/inveniosoftware/invenio-oauth2server/issues/186

Proposed Features:

Expiration Date Setting:

Revocation Mechanism:

Audit Logging:

Benefits:

github-actions[bot] commented 4 days ago

This issue was automatically marked as stale.