From eac53dcf7282e2faf57be3d2bd740727cfdbd2ec Mon Sep 17 00:00:00 2001 From: Wadeck Follonier Date: Fri, 25 May 2018 11:50:40 +0200 Subject: [PATCH] Address Devin's rewording points --- .../ApiTokenProperty/config.properties | 6 ++-- .../ApiTokenProperty/help-tokenStore.html | 4 +-- .../jenkins/security/Messages.properties | 1 - .../config.jelly | 6 ++-- .../config.properties | 3 ++ .../help-creationOfLegacyTokenEnabled.html | 6 ++-- ...help-tokenGenerationOnCreationEnabled.html | 6 ++-- .../help-usageStatisticsEnabled.html | 7 ++-- .../message.jelly | 2 +- .../message.properties | 6 ++-- .../message.jelly | 2 +- .../message.properties | 6 ++-- .../manage.properties | 32 +++++++++---------- .../message.properties | 4 +-- 14 files changed, 49 insertions(+), 42 deletions(-) create mode 100644 core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.properties diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/config.properties b/core/src/main/resources/jenkins/security/ApiTokenProperty/config.properties index 07d50d6cbd..fc6b26c4d7 100644 --- a/core/src/main/resources/jenkins/security/ApiTokenProperty/config.properties +++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/config.properties @@ -4,12 +4,12 @@ GenerateNewToken=Generate NoTokenYet=There is no registered token for this user TokenLastUse=Used {0} time(s), last time was {1} day(s) ago StatisticsDisabled=No statistics available -StatisticsDisabled.Title=The current configuration disables the statistics about token usage +StatisticsDisabled.Title=Token usage statistics are currently disabled TokenNeverUsed=Never used -TokenNeverUsed.Title=If you do not plan to use it, we strongly advice you to revoke it for security reasons +TokenNeverUsed.Title=We strongly recommend that you revoke tokens which you do not plan to use ConfirmRevokeSingle=Are you sure you want to revoke this token ? Applications that are using it will be not able to connect anymore. CurrentTokens=Current token(s) TokenCreation=Created {0} day(s) ago RenameToken=Save the new name of the token -LegacyToken=We strongly recommend you to revoke this Legacy API Token as it is not as secure as the others +LegacyToken=We strongly recommend that you revoke this legacy token and replace it with a newly generated token for increased security. NoLegacyToken=The user does not have a legacy token diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/help-tokenStore.html b/core/src/main/resources/jenkins/security/ApiTokenProperty/help-tokenStore.html index 6c0258d8e8..5ad5670b81 100644 --- a/core/src/main/resources/jenkins/security/ApiTokenProperty/help-tokenStore.html +++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/help-tokenStore.html @@ -1,11 +1,11 @@
- The API tokens can be used for authenticating yourself in the REST API call. + API tokens offer a way to make authenticated CLI or REST API calls. See our wiki for more details.
The username associated with each token is your Jenkins username.

Some good practices for keeping your API tokens secure are: diff --git a/core/src/main/resources/jenkins/security/Messages.properties b/core/src/main/resources/jenkins/security/Messages.properties index b74f76c49d..4e5ed11db2 100644 --- a/core/src/main/resources/jenkins/security/Messages.properties +++ b/core/src/main/resources/jenkins/security/Messages.properties @@ -25,7 +25,6 @@ ApiTokenProperty.ChangeToken.TokenIsHidden=Token is hidden ApiTokenProperty.ChangeToken.Success=
Updated. See the new token in the field above
ApiTokenProperty.ChangeToken.SuccessHidden=
Updated. You need to login as the user to see the token
ApiTokenProperty.ChangeToken.CapabilityNotAllowed=
Capability to generate a legacy token without an existing one is currently disabled in the security configuration
-ApiTokenProperty.NewTokenGenerated=
Token generated! The value will not be displayed anymore, please save it.
ApiTokenProperty.LegacyTokenName=Legacy Token ApiTokenProperty.NoLegacyToken=This user currently does not have a legacy token RekeySecretAdminMonitor.DisplayName=Re-keying diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.jelly b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.jelly index 65c17189f5..1bff873855 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.jelly +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.jelly @@ -27,13 +27,13 @@ THE SOFTWARE. - + - + - + diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.properties b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.properties new file mode 100644 index 0000000000..0661597a6c --- /dev/null +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/config.properties @@ -0,0 +1,3 @@ +tokenGenerationOnCreationEnabled=Generate a legacy API token for each newly created user (Not recommended) +creationOfLegacyTokenEnabled=Allow users to manually create a legacy API token (Not recommended) +usageStatisticsEnabled=Enable API Token usage statistics diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-creationOfLegacyTokenEnabled.html b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-creationOfLegacyTokenEnabled.html index 578047e45c..761f0f521a 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-creationOfLegacyTokenEnabled.html +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-creationOfLegacyTokenEnabled.html @@ -1,5 +1,5 @@
- Even if this is disabled (recommended for security reasons), the users are still able to generate new tokens - themselves on their configure page using the new system.
- It affects only the legacy tokens that are now deprecated. + This option allows users to generate a legacy API token if they do not already have one. + Because legacy tokens are deprecated, we recommend disabling it and having users instead generate + new API tokens from the user configuration page.
diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-tokenGenerationOnCreationEnabled.html b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-tokenGenerationOnCreationEnabled.html index d8b25ae6f9..f56b1a1d61 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-tokenGenerationOnCreationEnabled.html +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-tokenGenerationOnCreationEnabled.html @@ -1,5 +1,5 @@
- If this capability is disabled (recommended for security reasons), the users will be forced to use the new system of API token.
- This behavior was the legacy one used until the new system was implemented. - It affects only the legacy tokens that are now deprecated. + This option causes a legacy API token to be generated automatically for newly created users. + Because legacy tokens are deprecated, we recommend disabling it and having users instead generate + new API tokens from the user configuration page as needed.
diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-usageStatisticsEnabled.html b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-usageStatisticsEnabled.html index ba6ca31c0e..cf5baf744d 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-usageStatisticsEnabled.html +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyConfiguration/help-usageStatisticsEnabled.html @@ -1,7 +1,8 @@
- When a user is authenticated by an API Token, its usage counter is incremented and its last usage date updated. + If this option is enabled, then the date of the most recent use of each API token and the total number of times + it has been used are stored in Jenkins. + This allows users to see if they have unused or outdated API tokens which should be revoked.
- This allows users to have better understanding on which token are often used or potentially was never used or too long ago. - This could be a good signal for revocation. + This data is stored in your Jenkins instance and will not be used for any other purpose.
diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.jelly b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.jelly index bcae352386..923a29aa38 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.jelly +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.jelly @@ -25,7 +25,7 @@ THE SOFTWARE.
- + ${%warningMessage} diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.properties b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.properties index 71e8f0ab02..4f5e431354 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.properties +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyDisabledDefaultAdministrativeMonitor/message.properties @@ -1,2 +1,4 @@ -warningMessage=A Legacy API Token is currently generated when a new user is created.
\ - This behavior is just implemented to help users migrate at their own pace but not meant for long-term use. +warningMessage=A legacy API token will be generated automatically for newly created users.
\ + This behavior is supported for backwards compatibility, but legacy API tokens are deprecated and \ + are not recommended for long-term use.
\ + Users should instead generate API tokens as needed from the user configuration page. \ No newline at end of file diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.jelly b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.jelly index bb25a29b2e..2d57564a47 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.jelly +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.jelly @@ -25,7 +25,7 @@ THE SOFTWARE.
- + ${%warningMessage} diff --git a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.properties b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.properties index 0221fc76ee..db8dbe7b63 100644 --- a/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.properties +++ b/core/src/main/resources/jenkins/security/apitoken/ApiTokenPropertyEnabledNewLegacyAdministrativeMonitor/message.properties @@ -1,2 +1,4 @@ -warningMessage=Users without Legacy API Token have the capability to create new Legacy API Token.
\ - This behavior is just implemented to help users migrate at their own pace but not meant for long-term use. +warningMessage=Users without legacy API tokens are able to generate a new legacy token.
\ + This behavior is supported for backwards compatibility, but legacy API tokens are deprecated and \ + are not recommended for long-term use.
\ + Users should instead generate API tokens as needed from the user configuration page. \ No newline at end of file diff --git a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage.properties b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage.properties index 52b7a61c49..2f07d45c09 100644 --- a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage.properties +++ b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/manage.properties @@ -1,13 +1,13 @@ title=Manage Legacy API Token usage -contextMessage=The following users are using Legacy API Token. \ -As that old system stores the credentials in a recoverable format, it is strongly advised to migrate to the new system.
\ -In previous versions of Jenkins, the creation of a new user implied to the generation of an Legacy API Token. \ -Often majority of users are not using that token and so provide a larger potential attack surface than required.
\ -From now, the automatic generation of token is determined by configuration. +contextMessage=The following users have a legacy API token. \ + Because legacy tokens are stored in a recoverable format, we recommend migrating to the new API token system. \ + Additionally, in previous version of Jenkins, API tokens were automatically created for every new user. \ + Often, users did not use the token, resulting in a larger attack surface than necessary. \ + Automatic token generation must now be enabled explicitly. recommendationMessage=For such reasons, we recommend to: \
    \
  • revoke the tokens that were never used and
  • \ -
  • ask users that are effectively using their legacy token to generate a new token using the new system and revoking the legacy one
  • \ +
  • ask users that are currently using their legacy token to generate a token using the new system and revoke their legacy token
  • \
UserId=User Id UserFullName=User full name @@ -16,18 +16,18 @@ NumDaysSinceCreation=Days since creation NumOfUse=# of use NumDaysSinceLastUse=Days since last use HasFreshToken=Fresh token? -HasFreshToken_tooltip=A fresh token is a token from the new system \ -that was created after the last use of the legacy token. \n\n\ -Also it is important to notice that legacy token's creation date is reset \n\ -every time the instance is restarted if they were never saved before. So it was never used, the date is not really accurate. +HasFreshToken_tooltip=A fresh token is one that was created using the new system\n\ + after the most recent use of the user's legacy token. \n\n\ + Note: the creation date of legacy tokens which have never been used are reset every time Jenkins is restarted, \n\ + which means that the date may be inaccurate. HasMoreRecentlyUsedToken=Recent token? -HasMoreRecentlyUsedToken_tooltip=A recently used token is a token from the new system \ -that was used the last time after the last use of the legacy token. \n\n\ -Also it is important to notice that legacy token's creation date is reset \n\ -every time the instance is restarted if they were never saved before. -NoImpactedUser=There are no users with legacy token +HasMoreRecentlyUsedToken_tooltip=A recently used token is one that was created using the new system \n\ + and used more recently than the user's legacy token. \n\n\ + Note: the creation date of legacy tokens which have never been used are reset every time Jenkins is restarted, \n\ + which means that the date may be inaccurate. +NoImpactedUser=There are no users with a legacy token NoCreationDate=There is no creation date for that token NoLastUse=There is no last use date for that token RevokeAllSelected=Revoke the selected token(s) RevokeAllSelected_confirm=Are you sure about revoking all %num% selected token(s) -RevokeAllSelected_nothing=No token is selected, please select at least one to do the revocation \ No newline at end of file +RevokeAllSelected_nothing=No token is selected, please select at least one to revoke \ No newline at end of file diff --git a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/message.properties b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/message.properties index 9c771e99e3..54ce453f9f 100644 --- a/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/message.properties +++ b/core/src/main/resources/jenkins/security/apitoken/LegacyApiTokenAdministrativeMonitor/message.properties @@ -1,3 +1,3 @@ -warningMessage=There are users that are still using Legacy API Token. \ - That system is not as secured as the new one because it stores the token in a recoverable manner on the disk.
\ +warningMessage=There are users that are still using a legacy API token. \ + That system is not as secure as the new one because it stores the token in a recoverable manner on the disk.
\ See list of impacted users.