Skip to content

Token prefixes: Add support for oauth application secrets

What does this MR do and why?

This MR adds support for instance wide token prefixes to oauth application secrets.

Instance wide token prefix have been added with !179852 (merged)

The new prefix format is: #{instance_prefix}#{token_type_prefix}. E.g. for incoming mail tokens, we'd get: #{instance_prefix}gloas-. By default, this is the current token prefix gloas-. However, we can now customize the instance prefix to create a new prefix: mycompanynamegloas-.

With this custom prefix, it is easier to identify leaked tokens, because we can now skip all leaked tokens that start with gloas. Now, we only need to look at tokens starting with mycompanynamegloas-.

🛠️ with ❤️ at Siemens

References

How to set up and validate locally

  1. Enable feature flag via rails c:
Feature.enable(:custom_prefix_for_all_token_types)
  1. Generate a new application at https://gdk.test:3443/oauth/applications. Name can be anything, as an URL you can use http://localhost
  2. Now, change the instance wide token prefix: Admin area > General > Account and limit > Instance token prefix, e.g. to mycustomprefix
  3. Renew the token of the application. You should now see a new, prefixed token.

MR acceptance checklist

MR Checklist ( @nwittstruck)

Related to #388379

Edited by Nicholas Wittstruck

Merge request reports

Loading