0

can the user somehow regenerate the previously created consumer key and secret in devportal? is it possible to disable the user's ability to edit the token expiration time?

Gregory
  • 41
  • 5

2 Answers2

0

By default, it does not allow generating the same client id and client secret. Only way to do that is to edit the database table directly, and it is not a supported approach.

We can restrict users editing the token expiration time by doing a UI customization. However, it's better not to go down the customization path as it will increase the complexity and will have challenges when migrating to latest version.

One workaround/ solution is to introduce Application Creation and Token Generation workflow and manage it from the administrator level.

Joy Rathnayake
  • 485
  • 4
  • 8
  • thanks for the answer, is it possible to generate new keys from devportal? I don't see that there is a button to generate new keys if they already exist. I'm using version 4.1.0 – Gregory Feb 28 '23 at 11:51
  • There is no option to regerenare consumer key/ secret once generated. Only option is to delete the Application and recreate it. If we do that, we will loose all the Applications to API associations as well. – Joy Rathnayake Feb 28 '23 at 12:22
0

We have not provided any first-class support for the user to regenerate client secrets. But as a workaround admin user is able to regenerate client secrets for particular apps via the carbon console. (For other users' apps, the admin has to allocate a particular app role to the admin user, and then other users' apps(SPs) also will be visible to the admin user).

When you create an application in the dev portal and after you generate keys, a service provider will be created in the carbon console for that app.

enter image description here

Edit the particular service provider and go to the Inbound Authentication Configuration -> OAuth/OpenID Connect Configuration and click regenerate secret. Then it will regenerate the secret for the particular app.

enter image description here

chashikajw
  • 592
  • 5
  • 18