diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-26 23:01:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-26 23:01:24 +0300 |
commit | 1db6661143b27a91050245fc4ffb8bca66a1354a (patch) | |
tree | c2aa9dce49a687e7b5564ccbd656b0518c7fdd18 /spec/requests/api/internal | |
parent | 9854f4b0b92b7b5bc46c5b121e6c9615f4901b62 (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-ee
Diffstat (limited to 'spec/requests/api/internal')
-rw-r--r-- | spec/requests/api/internal/base_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/requests/api/internal/base_spec.rb b/spec/requests/api/internal/base_spec.rb index 619ffd8d41a..12b7b8d7054 100644 --- a/spec/requests/api/internal/base_spec.rb +++ b/spec/requests/api/internal/base_spec.rb @@ -50,6 +50,17 @@ RSpec.describe API::Internal::Base, feature_category: :system_access do expect(response).to have_gitlab_http_status(:ok) end + it 'authenticates using a jwt token with an IAT from 10 seconds in the future' do + headers = + travel_to(Time.now + 10.seconds) do + gitlab_shell_internal_api_request_header + end + + perform_request(headers: headers) + + expect(response).to have_gitlab_http_status(:ok) + end + it 'returns 401 when jwt token is expired' do headers = gitlab_shell_internal_api_request_header |