Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
1bb245c585
commit
6306b0c8d2
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
name: admin_agnostic_token_finder
|
||||
feature_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/443597
|
||||
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165157
|
||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/490572
|
||||
milestone: '17.5'
|
||||
group: group::authentication
|
||||
type: beta
|
||||
default_enabled: true
|
||||
|
|
@ -21,18 +21,14 @@ Prerequisites:
|
|||
## Get information on a token
|
||||
|
||||
> - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165157) in GitLab 17.5 [with a flag](../../administration/feature_flags.md) named `admin_agnostic_token_finder`. Disabled by default.
|
||||
> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/490572) in GitLab 17.8. Feature flag `admin_agnostic_token_finder` removed.
|
||||
> - [Feed tokens added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/169821) in GitLab 17.6.
|
||||
> - [OAuth application secrets added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172985) in GitLab 17.7.
|
||||
> - [Cluster agent tokens added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/172932) in GitLab 17.7.
|
||||
> - [Runner authentication tokens added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173987) in GitLab 17.7.
|
||||
> - [Pipeline trigger tokens added](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/174030) in GitLab 17.7.
|
||||
|
||||
FLAG:
|
||||
The availability of this feature is controlled by a feature flag.
|
||||
For more information, see the history.
|
||||
This feature is available for testing, but not ready for production use.
|
||||
|
||||
Gets information for a given token. This endpoint supports the following token types:
|
||||
Gets information for a given token. This endpoint supports the following tokens:
|
||||
|
||||
- [Personal access tokens](../../user/profile/personal_access_tokens.md)
|
||||
- [Impersonation tokens](../../api/rest/authentication.md#impersonation-tokens)
|
||||
|
|
|
|||
|
|
@ -17,10 +17,6 @@ module API
|
|||
|
||||
before do
|
||||
authenticated_as_admin!
|
||||
|
||||
if Feature.disabled?(:admin_agnostic_token_finder, current_user)
|
||||
render_api_error!("'admin_agnostic_token_finder' feature flag is disabled", :not_found)
|
||||
end
|
||||
end
|
||||
|
||||
rescue_from ArgumentError do |e|
|
||||
|
|
@ -32,8 +28,7 @@ module API
|
|||
end
|
||||
namespace 'admin/token' do
|
||||
desc 'Get information about a token.' do
|
||||
detail 'This feature was introduced in GitLab 17.5.
|
||||
This feature is gated by the :admin_agnostic_token_finder feature flag.'
|
||||
detail 'This feature was introduced in GitLab 17.5.'
|
||||
failure [
|
||||
{ code: 401, message: 'Unauthorized' },
|
||||
{ code: 403, message: 'Forbidden' },
|
||||
|
|
@ -53,8 +48,7 @@ module API
|
|||
end
|
||||
|
||||
desc 'Revoke a token.' do
|
||||
detail 'This feature was introduced in GitLab 17.7.
|
||||
This feature is gated by the :admin_agnostic_token_finder and api_admin_token_revoke feature flags.'
|
||||
detail 'This feature was introduced in GitLab 17.7.'
|
||||
failure [
|
||||
{ code: 401, message: 'Unauthorized' },
|
||||
{ code: 403, message: 'Forbidden' },
|
||||
|
|
|
|||
|
|
@ -15,14 +15,6 @@ RSpec.describe API::Admin::Token, :aggregate_failures, feature_category: :system
|
|||
|
||||
it_behaves_like 'returning response status', :unprocessable_entity
|
||||
end
|
||||
|
||||
context 'when the identification feature is disabled' do
|
||||
before do
|
||||
stub_feature_flags(admin_agnostic_token_finder: false)
|
||||
end
|
||||
|
||||
it_behaves_like 'returning response status', :not_found
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples 'rejecting requests with invalid or missing authorization' do
|
||||
|
|
|
|||
Loading…
Reference in New Issue