summaryrefslogtreecommitdiff
path: root/spec/requests/jwks_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/requests/jwks_controller_spec.rb')
-rw-r--r--spec/requests/jwks_controller_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/requests/jwks_controller_spec.rb b/spec/requests/jwks_controller_spec.rb
index ac9765c35d8..f756c1758e4 100644
--- a/spec/requests/jwks_controller_spec.rb
+++ b/spec/requests/jwks_controller_spec.rb
@@ -2,7 +2,7 @@
require 'spec_helper'
-RSpec.describe JwksController, feature_category: :authentication_and_authorization do
+RSpec.describe JwksController, feature_category: :system_access do
describe 'Endpoints from the parent Doorkeeper::OpenidConnect::DiscoveryController' do
it 'respond successfully' do
[
@@ -35,6 +35,15 @@ RSpec.describe JwksController, feature_category: :authentication_and_authorizati
expect(ids).to contain_exactly(ci_jwk['kid'], oidc_jwk['kid'])
end
+ it 'includes the OIDC signing key ID' do
+ get jwks_url
+
+ expect(response).to have_gitlab_http_status(:ok)
+
+ ids = json_response['keys'].map { |jwk| jwk['kid'] }
+ expect(ids).to include(Doorkeeper::OpenidConnect.signing_key_normalized.symbolize_keys[:kid])
+ end
+
it 'does not leak private key data' do
get jwks_url