core icon indicating copy to clipboard operation
core copied to clipboard

"Key" vs "Token" labeling

Open jdcmsd opened this issue 2 years ago • 1 comments

We use "key" and "token" interchangeably in some places (E.g., using Settings -> Users -> {User} -> Api Access Keys which leads to the "Token" modal), though the two aren't quite the same, e.g.:

  • https://security.stackexchange.com/a/161953
  • https://nordicapis.com/the-difference-between-api-keys-and-api-tokens/

It might be worth firming up the usage at the UI level. The final strings do appear to be tokens, since they have the two periods interspersed that seem to suggest the header/payload/signature structure.

As a possible starting point, the "API Access Keys" element described above appears to be defined in Language.properties:

https://github.com/dotCMS/core/blob/5576c53baa8a17ca5140a36f628cf7db48df86fe/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties#L303

https://github.com/dotCMS/core/blob/5576c53baa8a17ca5140a36f628cf7db48df86fe/dotCMS/src/main/webapp/WEB-INF/messages/Language.properties#L308

I found this, also, though I'm less sure of its corresponding element:

https://github.com/dotCMS/core/blob/8dfd881fa4e0fb5c065c15c835b7e3ec0a29f93a/core-web/apps/dotcms-ui/src/app/portlets/dot-starter/dot-starter.component.spec.ts#L40

https://github.com/dotCMS/core/blob/8dfd881fa4e0fb5c065c15c835b7e3ec0a29f93a/core-web/apps/dotcms-ui/src/app/portlets/dot-starter/dot-starter.component.spec.ts#L41

There may be other points where this comes up, not to mention in other languages. (Couldn't say offhand how that distinction plays in, say, French.)

jdcmsd avatar Sep 16 '22 16:09 jdcmsd

Getting the ball rolling with a first PR: https://github.com/dotCMS/core/pull/23008

Let me know if I've done anything askew from the standard approach.

jdcmsd avatar Sep 16 '22 16:09 jdcmsd

We need to double check if there are more cases.

fmontes avatar Sep 27 '22 14:09 fmontes

Hey team! Please add your planning poker estimate with Zenhub @hmoreras @jcastro-dotcms @jdotcms @rjvelazco

fmontes avatar Sep 27 '22 15:09 fmontes

Fixed, tested on release-22.10 // Docker // FF.

Image

Now we are using token everywhere.

bryanboza avatar Oct 04 '22 19:10 bryanboza