Skip to content
Snippets Groups Projects
Verified Commit 7365a54f authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray Committed by GitLab
Browse files

Sentence case access tokens

- Personal access tokens
- Group access tokens
- Project access tokens

[skip secret push protection]

Changelog: changed
parent b451deed
No related branches found
No related tags found
4 merge requests!162538Backport 17-2: Handle empty ff merge in from train ref strategy,!162537Backport 17-1: Handle empty ff merge in from train ref strategy,!162233Draft: Script to update Topology Service Gem,!161074Sentence case access tokens
Showing
with 33 additions and 33 deletions
......@@ -3,7 +3,7 @@ const sensitiveDataPatterns = () => {
return [
{
name: 'GitLab Personal Access Token',
name: 'GitLab personal access token',
regex: `${patPrefix}[0-9a-zA-Z_-]{20}`,
},
{
......
......@@ -29,7 +29,7 @@ export default {
`ContainerRegistry|With the Container Registry, every project can have its own space to store its Docker images. %{docLinkStart}More Information%{docLinkEnd}`,
),
notLoggedInMessage: s__(
`ContainerRegistry|If you are not already logged in, you need to authenticate to the Container Registry by using your GitLab username and password. If you have %{twofaDocLinkStart}Two-Factor Authentication%{twofaDocLinkEnd} enabled, use a %{personalAccessTokensDocLinkStart}Personal Access Token%{personalAccessTokensDocLinkEnd} instead of a password.`,
`ContainerRegistry|If you are not already logged in, you need to authenticate to the Container Registry by using your GitLab username and password. If you have %{twofaDocLinkStart}Two-Factor Authentication%{twofaDocLinkEnd} enabled, use a %{personalAccessTokensDocLinkStart}personal access token%{personalAccessTokensDocLinkEnd} instead of a password.`,
),
addImageText: s__(
'ContainerRegistry|You can add an image to this registry with the following commands:',
......
......@@ -65,7 +65,7 @@ def logged_in_with_provider?
def provider_auth
if session[access_token_key].blank? || provider_url.blank?
redirect_to new_import_gitea_url,
alert: _('You need to specify both an Access Token and a Host URL.')
alert: _('You need to specify both an access token and a Host URL.')
end
end
......
......@@ -56,9 +56,9 @@ def import_configure_github_admin_message
github_integration_link = link_to 'GitHub integration', help_page_path('integration/github')
if current_user.can_admin_all_resources?
_('Note: As an administrator you may like to configure %{github_integration_link}, which will allow login via GitHub and allow importing repositories without generating a Personal Access Token.').html_safe % { github_integration_link: github_integration_link }
_('Note: As an administrator you may like to configure %{github_integration_link}, which will allow login via GitHub and allow importing repositories without generating a personal access token.').html_safe % { github_integration_link: github_integration_link }
else
_('Note: Consider asking your GitLab administrator to configure %{github_integration_link}, which will allow login via GitHub and allow importing repositories without generating a Personal Access Token.').html_safe % { github_integration_link: github_integration_link }
_('Note: Consider asking your GitLab administrator to configure %{github_integration_link}, which will allow login via GitHub and allow importing repositories without generating a personal access token.').html_safe % { github_integration_link: github_integration_link }
end
end
end
......@@ -274,9 +274,9 @@ def no_password_message
set_up_pat_link_start = '<a href="%{url}">'.html_safe % { url: user_settings_personal_access_tokens_path }
message = if current_user.require_password_creation_for_git?
_('Your account is authenticated with SSO or SAML. To %{push_pull_link_start}push and pull%{link_end} over %{protocol} with Git using this account, you must %{set_password_link_start}set a password%{link_end} or %{set_up_pat_link_start}set up a Personal Access Token%{link_end} to use instead of a password. For more information, see %{clone_with_https_link_start}Clone with HTTPS%{link_end}.')
_('Your account is authenticated with SSO or SAML. To %{push_pull_link_start}push and pull%{link_end} over %{protocol} with Git using this account, you must %{set_password_link_start}set a password%{link_end} or %{set_up_pat_link_start}set up a personal access token%{link_end} to use instead of a password. For more information, see %{clone_with_https_link_start}Clone with HTTPS%{link_end}.')
else
_('Your account is authenticated with SSO or SAML. To %{push_pull_link_start}push and pull%{link_end} over %{protocol} with Git using this account, you must %{set_up_pat_link_start}set up a Personal Access Token%{link_end} to use instead of a password. For more information, see %{clone_with_https_link_start}Clone with HTTPS%{link_end}.')
_('Your account is authenticated with SSO or SAML. To %{push_pull_link_start}push and pull%{link_end} over %{protocol} with Git using this account, you must %{set_up_pat_link_start}set up a personal access token%{link_end} to use instead of a password. For more information, see %{clone_with_https_link_start}Clone with HTTPS%{link_end}.')
end
ERB::Util.html_escape(message) % {
......
......@@ -11,10 +11,10 @@ class Asana < Integration
field :api_key,
type: :password,
title: 'API key',
help: -> { s_('AsanaService|User Personal Access Token. User must have access to the task. All comments are attributed to this user.') },
help: -> { s_('AsanaService|User personal access token. User must have access to the task. All comments are attributed to this user.') },
non_empty_password_title: -> { s_('ProjectService|Enter new API key') },
non_empty_password_help: -> { s_('ProjectService|Leave blank to use your current API key.') },
placeholder: '0/68a9e79b868c6789e79a124c30b0', # Example Personal Access Token from Asana docs
placeholder: '0/68a9e79b868c6789e79a124c30b0', # Example personal access token from Asana docs
description: -> { s_('User API token. The user must have access to the task. All comments are attributed to this user.') },
required: true
......
......@@ -65,8 +65,8 @@ def update_bot_membership(target_user, expires_at)
# - retain the membership when this token does eventually expire
# or get revoked.
#
# Applies only to Resource (Group and Project) Access Tokens
# not Personal Access Tokens.
# Applies only to resource (group and project) access tokens
# not personal access tokens.
expires_at = nil
end
......
......@@ -61,7 +61,7 @@
= _('Must be 90 days or more.')
.form-group
= f.label :personal_access_token_prefix, _('Personal Access Token prefix'), class: 'label-light'
= f.label :personal_access_token_prefix, _('Personal access token prefix'), class: 'label-light'
= f.text_field :personal_access_token_prefix, placeholder: _('Maximum 20 characters'), class: 'form-control gl-form-input'
.form-group
= f.label :user_show_add_ssh_key_message, _('Prompt users to upload SSH keys'), class: 'label-bold'
......
- breadcrumb_title s_('AccessTokens|Access Tokens')
- page_title _('Group Access Tokens')
- breadcrumb_title s_('AccessTokens|Access tokens')
- page_title _('Group access tokens')
- type = _('group access token')
- type_plural = _('group access tokens')
- @force_desktop_expanded_sidebar = true
......
......@@ -21,9 +21,9 @@
.col-md-4
= text_field_tag :bitbucket_server_username, '', class: 'form-control gl-form-input gl-mr-3', placeholder: _('username'), size: 40
.form-group.row
= label_tag :personal_access_token, 'Password/Personal Access Token', class: 'col-form-label col-md-2'
= label_tag :personal_access_token, 'Password/Personal access token', class: 'col-form-label col-md-2'
.col-md-4
= password_field_tag :personal_access_token, '', class: 'form-control gl-form-input gl-mr-3', placeholder: _('Personal Access Token'), size: 40
= password_field_tag :personal_access_token, '', class: 'form-control gl-form-input gl-mr-3', placeholder: _('Personal access token'), size: 40
.form-actions
= render Pajamas::ButtonComponent.new(type: 'submit', variant: :confirm) do
= _('List your Bitbucket Server repositories')
......@@ -27,7 +27,7 @@
= form_tag personal_access_token_import_github_path, method: :post, class: 'gl-mt-3' do
.form-group.gl-form-group
%label.col-form-label{ for: 'personal_access_token' }= _('Personal Access Token')
%label.col-form-label{ for: 'personal_access_token' }= _('Personal access token')
= hidden_field_tag(:namespace_id, params[:namespace_id])
= password_field_tag :personal_access_token, '', class: 'form-control gl-form-input', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { testid: 'personal-access-token-field' }
%span.form-text.gl-text-gray-600
......
......@@ -5,6 +5,6 @@
= safe_format(_('Your %{resource_type} access token %{codeOpen}%{token_name}%{codeClose} for %{codeOpen}%{resource_path}%{codeClose} will expire in %{days_to_expire} or less.'), code_tag_pair, days_to_expire: pluralize(@days_to_expire, _('day')), token_name: @token_name, resource_path: @resource.full_path, resource_type: @resource.class.name)
%p
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url }
= html_escape(_('You can create a new one or check them in your %{link_start}Access Tokens%{link_end} settings.')) % { link_start: link_start, link_end: '</a>'.html_safe }
= html_escape(_('You can create a new one or check them in your %{link_start}access tokens%{link_end} settings.')) % { link_start: link_start, link_end: '</a>'.html_safe }
%p
= @reason_text
- breadcrumb_title s_('AccessTokens|Access Tokens')
- page_title _('Project Access Tokens')
- breadcrumb_title s_('AccessTokens|Access tokens')
- page_title _('Project access tokens')
- type = _('project access token')
- type_plural = _('project access tokens')
- @force_desktop_expanded_sidebar = true
......
- breadcrumb_title s_('AccessTokens|Access Tokens')
- page_title s_('AccessTokens|Personal Access Tokens')
- breadcrumb_title s_('AccessTokens|Access tokens')
- page_title s_('AccessTokens|Personal access tokens')
- type = _('personal access token')
- type_plural = _('personal access tokens')
- @force_desktop_expanded_sidebar = true
......
......@@ -55,7 +55,7 @@ When a PAT is revoked from the credentials inventory, the instance notifies the
1. On the left sidebar, at the bottom, select **Admin**.
1. Select **Credentials**.
1. Select the **Project Access Tokens** tab.
1. Select the **Project access tokens** tab.
1. By the project access token, select **Revoke**.
The project access token is revoked and a background worker is queued to delete the project bot user.
......
......@@ -64,7 +64,7 @@ You must have administrator access to use any of the following methods:
1. Select the `pause` button next to each runner you would like to pause.
1. After the failover is complete, unpause the runners you paused in the previous step.
- Use the [Runners API](../../../api/runners.md):
1. Fetch or create a [Personal Access Token](../../../user/profile/personal_access_tokens.md) with administrator access.
1. Fetch or create a [personal access token](../../../user/profile/personal_access_tokens.md) with administrator access.
1. Get the list of runners. You can filter the list [using the API](../../../api/runners.md#list-all-runners).
1. Identify the runners you would like to pause, and make note of their `id`.
1. [Follow the API documentation](../../../api/runners.md#pause-a-runner) to pause each runner.
......
......@@ -380,7 +380,7 @@ separate Rails process to debug the issue:
1. Sign in to your GitLab account.
1. Copy the URL that is causing problems (for example, `https://gitlab.com/ABC`).
1. Create a Personal Access Token for your user (User Settings -> Access Tokens).
1. Create a personal access token for your user (User Settings -> Access tokens).
1. Bring up the [GitLab Rails console.](../operations/rails_console.md#starting-a-rails-console-session)
1. At the Rails console, run:
......
......@@ -93,7 +93,7 @@ To change the default global prefix:
1. On the left sidebar, at the bottom, select **Admin**.
1. Select **Settings > General**.
1. Expand the **Account and limit** section.
1. Fill in the **Personal Access Token prefix** field.
1. Fill in the **Personal access token prefix** field.
1. Select **Save changes**.
You can also configure the prefix by using the
......
......@@ -27,7 +27,7 @@ You can restrict the password authentication for web interface and Git over HTTP
- **Web interface**: When this feature is disabled, the **Standard** sign-in tab
is removed and an [external authentication provider](../auth/index.md)
must be used.
- **Git over HTTP(S)**: When this feature is disabled, a [Personal Access Token](../../user/profile/personal_access_tokens.md)
- **Git over HTTP(S)**: When this feature is disabled, a [personal access token](../../user/profile/personal_access_tokens.md)
or LDAP password must be used to authenticate.
In the event of an external authentication provider outage, use the [GitLab Rails console](../operations/rails_console.md) to [re-enable the standard web sign-in form](#re-enable-standard-web-sign-in-form-in-rails-console). This configuration can also be changed over the [Application settings REST API](../../api/settings.md#change-application-settings) while authenticating with an administrator account's personal access token.
......@@ -128,7 +128,7 @@ Admin Mode times out after six hours, and you cannot change this timeout limit.
The following access methods are **not** protected by Admin Mode:
- Git client access (SSH using public keys or HTTPS using Personal Access Tokens).
- Git client access (SSH using public keys or HTTPS using Personal access tokens).
In other words, administrators who are otherwise limited by Admin Mode can still use
Git clients without additional authentication steps.
......
......@@ -1635,7 +1635,7 @@ Supported attributes:
| `id` | integer | yes | ID of a service account user. |
| `hard_delete` | boolean | no | If true, contributions that would usually be [moved to a Ghost User](../user/profile/account/delete_account.md#associated-records) are deleted instead, as well as groups owned solely by this service account user. |
### Create Personal Access Token for Service Account User
### Create personal access token for Service Account User
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/406781) in GitLab 16.1.
......@@ -1672,7 +1672,7 @@ Example response:
| `scopes` | array | yes | Array of scopes of the personal access token. See [personal access token scopes](../user/profile/personal_access_tokens.md#personal-access-token-scopes) for possible values. |
| `expires_at` | date | no | Personal access token expiry date. When left blank, the token follows the [standard rule of expiry for personal access tokens](../user/profile/personal_access_tokens.md#when-personal-access-tokens-expire). |
### Rotate a Personal Access Token for Service Account User
### Rotate a personal access token for Service Account User
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/406781) in GitLab 16.1.
......@@ -2809,9 +2809,9 @@ The following criteria must be met:
- The group must be a top-level group.
- You must have the Owner role in the group.
- The token type is one of:
- Personal Access Token
- Group Access Token
- Project Access Token
- Personal access token
- Group access token
- Project access token
- Group Deploy Token
Additional token types may be supported at a later date.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment