-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implement API Bearer Token support #34
Comments
I think that you should use Redmine standard |
Technically ok. But not as secure. Why?
|
Consider the following scenario. I have only openid accounts enabled, local passwords are not really set. Now I have an external script, that wants to use the Redmine API to perform some tasks. At the moment the only possible approach is for the user to log-in via the browser and copy the API access key and paste it into my external tool. (Generally the time those redmine api tokens last is very bad. One should introduce a regular rotation of this key.) We should at least discuss an endpoint to gather the current redmine api key by providing a valid access token for the configured openid identity provider. |
I would propose, that in addition to the authentication methods described in https://www.redmine.org/projects/redmine/wiki/rest_api#Authentication this plugin should "listen" for HTTP Header |
Interesting in this aspect https://www.redmine.org/issues/41220 |
I have a very interesting example, which is how I think it should work in redmine too, the following NGINX location configuration protects the calls by using the JWT access module:
If I post something here, than only if the JWT Token is valid, and has the realm_access.role "protected-access" then it will be allowed. This plugin should enable API calls to behave like this. It is far more secure to use a short-lived token to perform API accesses than the everlasting api key used by default in redmine. There should be even an option to disallow the api token. |
These are the current authentication methods https://www.redmine.org/projects/redmine/wiki/rest_api#Authentication for the redmine api.
What is missing here, is the Auth Type "Bearer Token", which may then be an oauth2 access-token.
It might be a better approach, however, to use a JWT based validation here (like e.g. the solr jwt auth https://solr.apache.org/guide/solr/latest/deployment-guide/jwt-authentication-plugin.html) (REF
https://www.redmine.org/issues/25140)
The text was updated successfully, but these errors were encountered: