From 9e4a5c7cc03720cb876ab10b78fa1a781f7ee65b Mon Sep 17 00:00:00 2001 From: Sergei Maertens Date: Wed, 3 Jul 2024 11:54:49 +0200 Subject: [PATCH] :white_check_mark: [#3967] Add test for branch number extraction with eHerkenning via OIDC auth --- ...sts.test_record_vestiging_restriction.yaml | 371 ++++++++++++++++++ ...sts.test_record_vestiging_restriction.yaml | 371 ++++++++++++++++++ .../tests/test_auth_context_data.py | 46 +++ 3 files changed, 788 insertions(+) create mode 100644 src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningAuthContextTests/EHerkenningAuthContextTests.test_record_vestiging_restriction.yaml create mode 100644 src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningBewindvoeringAuthContextTests/EHerkenningBewindvoeringAuthContextTests.test_record_vestiging_restriction.yaml diff --git a/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningAuthContextTests/EHerkenningAuthContextTests.test_record_vestiging_restriction.yaml b/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningAuthContextTests/EHerkenningAuthContextTests.test_record_vestiging_restriction.yaml new file mode 100644 index 0000000000..33cdb163db --- /dev/null +++ b/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningAuthContextTests/EHerkenningAuthContextTests.test_record_vestiging_restriction.yaml @@ -0,0 +1,371 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/auth + response: + body: + string: "\n\n\n\n \n + \ \n \n\n \n Sign + in to test\n \n \n \n \n \n \n\n\n\n
\n + \
\n
test
\n
\n
\n + \
\n

+ \ We are sorry...\n

\n
\n
\n + \
\n\n\n
\n + \

Invalid Request

\n
\n\n\n\n + \
\n
\n\n
\n
\n\n\n" + headers: + Content-Language: + - en + Content-Security-Policy: + - frame-src 'self'; frame-ancestors 'self'; object-src 'none'; + Content-Type: + - text/html;charset=utf-8 + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Robots-Tag: + - none + X-XSS-Protection: + - 1; mode=block + content-length: + - '1573' + status: + code: 400 + message: Bad Request +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/auth?response_type=code&scope=openid+kvk&client_id=testid&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Feherkenning-oidc%2Fcallback%2F&state=not-a-random-string&nonce=not-a-random-string + response: + body: + string: "\n\n\n\n \n + \ \n \n\n \n Sign + in to test\n \n \n \n \n \n \n \n\n\n\n
\n + \
\n
test
\n
\n
\n + \
\n

+ \ Sign in to your account\n\n

\n
\n
\n + \
\n\n\n
\n + \
\n
\n
\n \n\n \n\n\n
\n\n
\n \n\n
\n + \ \n \n + \
\n\n\n
\n\n
\n
\n + \
\n
\n + \
\n\n
\n\n
\n \n \n
\n + \
\n
\n
\n \n\n\n\n\n\n + \
\n
\n\n
\n
\n\n\n" + headers: + Cache-Control: + - no-store, must-revalidate, max-age=0 + Content-Language: + - en + Content-Security-Policy: + - frame-src 'self'; frame-ancestors 'self'; object-src 'none'; + Content-Type: + - text/html;charset=utf-8 + Referrer-Policy: + - no-referrer + Set-Cookie: + - AUTH_SESSION_ID=35e8d5a1-245e-4ae5-b073-832f1c666996; Version=1; Path=/realms/test/; + SameSite=None; Secure; HttpOnly + - AUTH_SESSION_ID_LEGACY=35e8d5a1-245e-4ae5-b073-832f1c666996; Version=1; Path=/realms/test/; + HttpOnly + - KC_RESTART=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJjaWQiOiJ0ZXN0aWQiLCJwdHkiOiJvcGVuaWQtY29ubmVjdCIsInJ1cmkiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvZWhlcmtlbm5pbmctb2lkYy9jYWxsYmFjay8iLCJhY3QiOiJBVVRIRU5USUNBVEUiLCJub3RlcyI6eyJzY29wZSI6Im9wZW5pZCBrdmsiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QiLCJyZXNwb25zZV90eXBlIjoiY29kZSIsInJlZGlyZWN0X3VyaSI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9laGVya2VubmluZy1vaWRjL2NhbGxiYWNrLyIsInN0YXRlIjoibm90LWEtcmFuZG9tLXN0cmluZyIsIm5vbmNlIjoibm90LWEtcmFuZG9tLXN0cmluZyJ9fQ.8Me56DCFR5bLdeB5ofc-CuoI9b7hc0w7Lc7eKn6tu-A; + Version=1; Path=/realms/test/; HttpOnly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Robots-Tag: + - none + X-XSS-Protection: + - 1; mode=block + content-length: + - '4466' + status: + code: 200 + message: OK +- request: + body: username=eherkenning-vestiging&password=eherkenning-vestiging&credentialId=&login=Sign+In + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '89' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - AUTH_SESSION_ID_LEGACY=35e8d5a1-245e-4ae5-b073-832f1c666996; KC_RESTART=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJjaWQiOiJ0ZXN0aWQiLCJwdHkiOiJvcGVuaWQtY29ubmVjdCIsInJ1cmkiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvZWhlcmtlbm5pbmctb2lkYy9jYWxsYmFjay8iLCJhY3QiOiJBVVRIRU5USUNBVEUiLCJub3RlcyI6eyJzY29wZSI6Im9wZW5pZCBrdmsiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QiLCJyZXNwb25zZV90eXBlIjoiY29kZSIsInJlZGlyZWN0X3VyaSI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODAwMC9laGVya2VubmluZy1vaWRjL2NhbGxiYWNrLyIsInN0YXRlIjoibm90LWEtcmFuZG9tLXN0cmluZyIsIm5vbmNlIjoibm90LWEtcmFuZG9tLXN0cmluZyJ9fQ.8Me56DCFR5bLdeB5ofc-CuoI9b7hc0w7Lc7eKn6tu-A + User-Agent: + - python-requests/2.32.2 + method: POST + uri: http://localhost:8080/realms/test/login-actions/authenticate?session_code=n8PB65X2Mz-Io--S1eAV_2XD-59Pt9Ix4UG_7RZetXA&execution=d8b8778e-a545-45d4-8f72-fd69facf4b72&client_id=testid&tab_id=BZeD_i00vt0 + response: + body: + string: '' + headers: + Cache-Control: + - no-store, must-revalidate, max-age=0 + Content-Security-Policy: + - frame-src 'self'; frame-ancestors 'self'; object-src 'none'; + Location: + - http://localhost:8000/eherkenning-oidc/callback/?state=not-a-random-string&session_state=35e8d5a1-245e-4ae5-b073-832f1c666996&iss=http%3A%2F%2Flocalhost%3A8080%2Frealms%2Ftest&code=a8decc28-6b10-4fad-90da-9b436a99cff8.35e8d5a1-245e-4ae5-b073-832f1c666996.adf4ad83-4550-4619-9231-73bd8d700f45 + Referrer-Policy: + - no-referrer + Set-Cookie: + - KEYCLOAK_LOCALE=; Version=1; Comment=Expiring cookie; Expires=Thu, 01-Jan-1970 + 00:00:10 GMT; Max-Age=0; Path=/realms/test/; HttpOnly + - KC_RESTART=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; + Path=/realms/test/; HttpOnly + - KC_AUTH_STATE=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; + Path=/realms/test/ + - KEYCLOAK_IDENTITY=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJleHAiOjE3MjAwMzY0MjUsImlhdCI6MTcyMDAwMDQyNSwianRpIjoiYmQwNWRkZjUtZTA0Ni00YWMyLThiN2MtOWZmOTEyZDdlYWFmIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy90ZXN0Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y2Y1YjM5IiwidHlwIjoiU2VyaWFsaXplZC1JRCIsInNlc3Npb25fc3RhdGUiOiIzNWU4ZDVhMS0yNDVlLTRhZTUtYjA3My04MzJmMWM2NjY5OTYiLCJzaWQiOiIzNWU4ZDVhMS0yNDVlLTRhZTUtYjA3My04MzJmMWM2NjY5OTYiLCJzdGF0ZV9jaGVja2VyIjoiTE9SVmxfS2ZjNzVKMzZBNXJ5UHpZbG5Pd2JwZlYzdmtpZWppOTliaFNObyJ9._nawCCW9PW65E4iRj2y1_gcA1IYIBbSf4vX0wR7NDy0; + Version=1; Path=/realms/test/; SameSite=None; Secure; HttpOnly + - KEYCLOAK_IDENTITY_LEGACY=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJleHAiOjE3MjAwMzY0MjUsImlhdCI6MTcyMDAwMDQyNSwianRpIjoiYmQwNWRkZjUtZTA0Ni00YWMyLThiN2MtOWZmOTEyZDdlYWFmIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy90ZXN0Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y2Y1YjM5IiwidHlwIjoiU2VyaWFsaXplZC1JRCIsInNlc3Npb25fc3RhdGUiOiIzNWU4ZDVhMS0yNDVlLTRhZTUtYjA3My04MzJmMWM2NjY5OTYiLCJzaWQiOiIzNWU4ZDVhMS0yNDVlLTRhZTUtYjA3My04MzJmMWM2NjY5OTYiLCJzdGF0ZV9jaGVja2VyIjoiTE9SVmxfS2ZjNzVKMzZBNXJ5UHpZbG5Pd2JwZlYzdmtpZWppOTliaFNObyJ9._nawCCW9PW65E4iRj2y1_gcA1IYIBbSf4vX0wR7NDy0; + Version=1; Path=/realms/test/; HttpOnly + - KEYCLOAK_SESSION=test/44be45f6-a7ae-42c2-9486-30f078cf5b39/35e8d5a1-245e-4ae5-b073-832f1c666996; + Version=1; Expires=Wed, 03-Jul-2024 19:53:45 GMT; Max-Age=36000; Path=/realms/test/; + SameSite=None; Secure + - KEYCLOAK_SESSION_LEGACY=test/44be45f6-a7ae-42c2-9486-30f078cf5b39/35e8d5a1-245e-4ae5-b073-832f1c666996; + Version=1; Expires=Wed, 03-Jul-2024 19:53:45 GMT; Max-Age=36000; Path=/realms/test/ + - KEYCLOAK_REMEMBER_ME=; Version=1; Comment=Expiring cookie; Expires=Thu, 01-Jan-1970 + 00:00:10 GMT; Max-Age=0; Path=/realms/test/; HttpOnly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Robots-Tag: + - none + X-XSS-Protection: + - 1; mode=block + content-length: + - '0' + status: + code: 302 + message: Found +- request: + body: client_id=testid&client_secret=7DB3KUAAizYCcmZufpHRVOcD0TOkNO3I&grant_type=authorization_code&code=a8decc28-6b10-4fad-90da-9b436a99cff8.35e8d5a1-245e-4ae5-b073-832f1c666996.adf4ad83-4550-4619-9231-73bd8d700f45&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Feherkenning-oidc%2Fcallback%2F + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '285' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.2 + method: POST + uri: http://localhost:8080/realms/test/protocol/openid-connect/token + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI0VU5RQWN2VWN2LURGVU94XzRPMWd0MTNPZEpTb3RxRUtQWnVyczJ2UVc4In0.eyJleHAiOjE3MjAwMDA3MjUsImlhdCI6MTcyMDAwMDQyNSwiYXV0aF90aW1lIjoxNzIwMDAwNDI1LCJqdGkiOiI3ODQ5ZTcxOS0xNGY0LTQ4NGYtOGY5Ni1lYTI2NzM0MWZhYzkiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y2Y1YjM5IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoidGVzdGlkIiwibm9uY2UiOiJub3QtYS1yYW5kb20tc3RyaW5nIiwic2Vzc2lvbl9zdGF0ZSI6IjM1ZThkNWExLTI0NWUtNGFlNS1iMDczLTgzMmYxYzY2Njk5NiIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cDovLzEyNy4wLjAuMTo4MDAwIl0sInJlYWxtX2FjY2VzcyI6eyJyb2xlcyI6WyJkZWZhdWx0LXJvbGVzLXRlc3QiLCJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl19LCJyZXNvdXJjZV9hY2Nlc3MiOnsiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJvcGVuaWQgZW1haW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q0JwcXN4RVJQOUdsU2Q4ZyIsImFjciI6IjEiLCJzaWQiOiIzNWU4ZDVhMS0yNDVlLTRhZTUtYjA3My04MzJmMWM2NjY5OTYiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImxlZ2FsU3ViamVjdElEIjoiMTIzNDU2NzgiLCJhY3RpbmdTdWJqZWN0SUQiOiI0Qjc1QTBFQTEwN0IzRDM2IiwibmFtZV9xdWFsaWZpZXIiOiJ1cm46ZXRvZWdhbmc6MS45OkVudGl0eUNvbmNlcm5lZElEOkt2S25yIiwiZ3JvdXBzIjpbImRlZmF1bHQtcm9sZXMtdGVzdCIsIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiZWhlcmtlbm5pbmctdmVzdGlnaW5nIiwidmVzdGlnaW5nIjoiMTIzNDU2Nzg5MDEyIn0.Ht8g4r-WD_BQzwJ7ciJcbHC7rKgly2iKjDsslfoL9K7V4q7S-hPPSAneMxdo-cVLVuSMebBMDLegef5zWUnQkBE1O1t0Co3HPLrmaT1Tdvd4XPZY5EyWQQHQatBoiO3dVyL9CA4pehk8RloRFNSX2_4UaeXu9pMCZ9kNrIDvPKGbhXVqJqKGF95N8Uo88rR7WXPKtb18bru7C0DkMI2hrftpyMZZ5-VPhDuJQsLqd02bmchBMeXYjGz7_eaA7pyATSzDlsDb1xkPLh_jzodED7mJfMoN74Pr7YbfOq2h8mz4Ra6RBlGdFAu07fEI6qeoy73Tzegn0_1UuLkcXzTfJQ","not-before-policy":0,"session_state":"35e8d5a1-245e-4ae5-b073-832f1c666996","scope":"openid + email profile kvk groups bsn"}' + headers: + Cache-Control: + - no-store + Content-Type: + - application/json + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - 1; mode=block + content-length: + - '4029' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/certs + response: + body: + string: '{"keys":[{"kid":"4UNQAcvUcv-DFUOx_4O1gt13OdJSotqEKPZurs2vQW8","kty":"RSA","alg":"RS256","use":"sig","n":"2DOZ0qHie73SuFVR7civrl6r82YUiAghfzaMowjCg0o06AF--2lIS7vNV_PbsVVznPAAMqVrNG-8CcevEzvVZMQD9nH4DI7xlOxK0lrYu8rmMeSfOvXVbBVsWBZe0jnGNukZqjwmRE5__ttJdxPfIBT5-2L6mguQbDfhSUEEdIW7y7UfOXvqLqEcBtoIEB-ORKDTUIQwGZM5mSCy-cY3cHvvZfZVgaUUy5NvujPRXTMje4n_hG0KfEV-40G9qC2_Xvx4EooJzBZ6FSThiWhCpwhIvzcQqB6M9lHW7nU6wADhYPNCa2OKWvphwZ_zbrF4B9dmS6Zli5rBvbox9Hh45w","e":"AQAB","x5c":["MIIClzCCAX8CBgGNeYaMLTANBgkqhkiG9w0BAQsFADAPMQ0wCwYDVQQDDAR0ZXN0MB4XDTI0MDIwNTEzNDYxN1oXDTM0MDIwNTEzNDc1N1owDzENMAsGA1UEAwwEdGVzdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANgzmdKh4nu90rhVUe3Ir65eq/NmFIgIIX82jKMIwoNKNOgBfvtpSEu7zVfz27FVc5zwADKlazRvvAnHrxM71WTEA/Zx+AyO8ZTsStJa2LvK5jHknzr11WwVbFgWXtI5xjbpGao8JkROf/7bSXcT3yAU+fti+poLkGw34UlBBHSFu8u1Hzl76i6hHAbaCBAfjkSg01CEMBmTOZkgsvnGN3B772X2VYGlFMuTb7oz0V0zI3uJ/4RtCnxFfuNBvagtv178eBKKCcwWehUk4YloQqcISL83EKgejPZR1u51OsAA4WDzQmtjilr6YcGf826xeAfXZkumZYuawb26MfR4e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EBAKTb1N3nKVR2yU+GwjhKcOnJ1dcouubQdyNG0RdopS1TmPeOEEQBp4wQRAjyMzW4Kmr4IWKdY++Rdp6uv58tQmH6GsU1dog6UVMPP3+7JYmG5fBayy2rdEtuSLZWa4OUxCRzm7zqpRtv516Hh9+jEVsDYZrNrgqn4Z+VYLXpyM6UCAaJZzO88xqdtTb3SdQv2QFM5Fwvpd6EPgV07aRFTOIdiqWIeIH2SVgm2Io+XdXtWAKSg+letfwrNzmtjmOwgFMquZIAFiWRQwegqcyK9turt21exfUW60Lt2G3Py799xMMpLHC85ylmWNjG7NyM/6xTb97FV/7x6R+Ax1pSru0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAQGJHeTYSMvp0yndbIn7DLohO9lom5nRrx/bLyb7TiRfogyJEF6rQZ66CAkQFk5eMF878fsHTuMVjtmXVBnhojhVmK91HwjsNQu/8xR6QMXNKJQMvHR245vwUGxlWRw/36ObM1D7QjCd/q+FonpBEY4m5Y6Uz1U0HR2Cbh0E2afVlPLeV+F0LKrlyVMdIaWBGWftCGIKDAHaG/PD66zbAKtxerv2fBIDq100WHPhd57BZxX+2aGJp1IaRDgkxV0E/CjEy3+Knd8xbAgUSW0Tl6OTC75exIvlbzeluEBe0wlapAb7WvBKYsipSW8G8Ey7tjoolDT4AU82EaKUPstiMnA=="],"x5t":"AlfHDI0FOPQpt3RBAILt0dtW1yw","x5t#S256":"a7bhm8-JsnfY7bL_m8Yl72hgmp5516VZlFcVloKzk08"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;charset=UTF-8 + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - 1; mode=block + content-length: + - '2909' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Authorization: + - Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi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NEMzYiLCJuYW1lX3F1YWxpZmllciI6InVybjpldG9lZ2FuZzoxLjk6RW50aXR5Q29uY2VybmVkSUQ6S3ZLbnIiLCJncm91cHMiOlsiZGVmYXVsdC1yb2xlcy10ZXN0Iiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJlaGVya2VubmluZy12ZXN0aWdpbmciLCJ2ZXN0aWdpbmciOiIxMjM0NTY3ODkwMTIifQ.djXI04yg-TIrn4iQAV9ePqy0KL7VEpayJdh0RqLmt-8t4I0aY93An2TL9gGD4lMS_J813rlze1txka3ivx-AImQfT80VjVj4rdhq_8m0ow3fdpzWDH92BD5qcHBsq6_u7VPqOrctLfhvho8sPGcBoUcByaYvipG_V1UWKlptAY3BebBjmGpSrZavTkX5A1AdSUL5uNwehuz8BOydDMBGcyLwkdj2r9PkQ83jJXOMKrXANKgWFcCmXeHchxAgVPMM0m5YWCZUgcldcBC6WcraeAsB4oRxxdjrSuEDIIIgXIUGo1fb_doWO0U9EanDKbxlmHKE_iYLks834PMwyxX8ag + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/userinfo + response: + body: + string: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI0VU5RQWN2VWN2LURGVU94XzRPMWd0MTNPZEpTb3RxRUtQWnVyczJ2UVc4In0.eyJzdWIiOiI0NGJlNDVmNi1hN2FlLTQyYzItOTQ4Ni0zMGYwNzhjZjViMzkiLCJhdWQiOiJ0ZXN0aWQiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImxlZ2FsU3ViamVjdElEIjoiMTIzNDU2NzgiLCJhY3RpbmdTdWJqZWN0SUQiOiI0Qjc1QTBFQTEwN0IzRDM2IiwibmFtZV9xdWFsaWZpZXIiOiJ1cm46ZXRvZWdhbmc6MS45OkVudGl0eUNvbmNlcm5lZElEOkt2S25yIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy90ZXN0IiwiZ3JvdXBzIjpbImRlZmF1bHQtcm9sZXMtdGVzdCIsIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXSwicHJlZmVycmVkX3VzZXJuYW1lIjoiZWhlcmtlbm5pbmctdmVzdGlnaW5nIiwidmVzdGlnaW5nIjoiMTIzNDU2Nzg5MDEyIn0.SvJBCCIEMLYvA0QotatwGowE-q85L_El58-Um2YOmqTmOjWuHe6aPMgE3KN51uwJDtfrMqsna-0Or-u1k32f4SiT6Wh2o62ajKkP-mjwux5m0qJ28-pg-AfArzgkGNuEUzZsEL5zbewNYD7VoJy0JaX-TqtRXibasdUIgzVK4aBsMRjnjfAnK8r5xzIbIbDJ6UN5Lclhojoi_SmThw9RRUizCfYKhvwypv9RpmwvyWEP4zB_BUPBWoooi1ESgXjIpP351rxmEet27flJjzKaSNVnqni3plhXMf2lyCV14frNLsWvQKGEaGQda3s0RvUvm_0Czz2EzgAE2Ts_JR-VFg + headers: + Cache-Control: + - no-cache + Content-Type: + - application/jwt + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-XSS-Protection: + - 1; mode=block + content-length: + - '978' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/certs + response: + body: + string: '{"keys":[{"kid":"4UNQAcvUcv-DFUOx_4O1gt13OdJSotqEKPZurs2vQW8","kty":"RSA","alg":"RS256","use":"sig","n":"2DOZ0qHie73SuFVR7civrl6r82YUiAghfzaMowjCg0o06AF--2lIS7vNV_PbsVVznPAAMqVrNG-8CcevEzvVZMQD9nH4DI7xlOxK0lrYu8rmMeSfOvXVbBVsWBZe0j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0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAQGJHeTYSMvp0yndbIn7DLohO9lom5nRrx/bLyb7TiRfogyJEF6rQZ66CAkQFk5eMF878fsHTuMVjtmXVBnhojhVmK91HwjsNQu/8xR6QMXNKJQMvHR245vwUGxlWRw/36ObM1D7QjCd/q+FonpBEY4m5Y6Uz1U0HR2Cbh0E2afVlPLeV+F0LKrlyVMdIaWBGWftCGIKDAHaG/PD66zbAKtxerv2fBIDq100WHPhd57BZxX+2aGJp1IaRDgkxV0E/CjEy3+Knd8xbAgUSW0Tl6OTC75exIvlbzeluEBe0wlapAb7WvBKYsipSW8G8Ey7tjoolDT4AU82EaKUPstiMnA=="],"x5t":"AlfHDI0FOPQpt3RBAILt0dtW1yw","x5t#S256":"a7bhm8-JsnfY7bL_m8Yl72hgmp5516VZlFcVloKzk08"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;charset=UTF-8 + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - 1; mode=block + content-length: + - '2909' + status: + code: 200 + message: OK +version: 1 diff --git a/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningBewindvoeringAuthContextTests/EHerkenningBewindvoeringAuthContextTests.test_record_vestiging_restriction.yaml b/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningBewindvoeringAuthContextTests/EHerkenningBewindvoeringAuthContextTests.test_record_vestiging_restriction.yaml new file mode 100644 index 0000000000..7637078fce --- /dev/null +++ b/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/data/vcr_cassettes/EHerkenningBewindvoeringAuthContextTests/EHerkenningBewindvoeringAuthContextTests.test_record_vestiging_restriction.yaml @@ -0,0 +1,371 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/auth + response: + body: + string: "\n\n\n\n \n + \ \n \n\n \n Sign + in to test\n \n \n \n \n \n \n\n\n\n
\n + \
\n
test
\n
\n
\n + \
\n

+ \ We are sorry...\n

\n
\n
\n + \
\n\n\n
\n + \

Invalid Request

\n
\n\n\n\n + \
\n
\n\n
\n
\n\n\n" + headers: + Content-Language: + - en + Content-Security-Policy: + - frame-src 'self'; frame-ancestors 'self'; object-src 'none'; + Content-Type: + - text/html;charset=utf-8 + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Robots-Tag: + - none + X-XSS-Protection: + - 1; mode=block + content-length: + - '1573' + status: + code: 400 + message: Bad Request +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/auth?response_type=code&scope=openid+bsn&client_id=testid&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Feherkenning-bewindvoering-oidc%2Fcallback%2F&state=not-a-random-string&nonce=not-a-random-string + response: + body: + string: "\n\n\n\n \n + \ \n \n\n \n Sign + in to test\n \n \n \n \n \n \n \n\n\n\n
\n + \
\n
test
\n
\n
\n + \
\n

+ \ Sign in to your account\n\n

\n
\n
\n + \
\n\n\n
\n + \
\n
\n
\n \n\n \n\n\n
\n\n
\n \n\n
\n + \ \n \n + \
\n\n\n
\n\n
\n
\n + \
\n
\n + \
\n\n
\n\n
\n \n \n
\n + \
\n
\n
\n \n\n\n\n\n\n + \
\n
\n\n
\n
\n\n\n" + headers: + Cache-Control: + - no-store, must-revalidate, max-age=0 + Content-Language: + - en + Content-Security-Policy: + - frame-src 'self'; frame-ancestors 'self'; object-src 'none'; + Content-Type: + - text/html;charset=utf-8 + Referrer-Policy: + - no-referrer + Set-Cookie: + - AUTH_SESSION_ID=20798378-7c26-494b-b31e-6c3b829dbd70; Version=1; Path=/realms/test/; + SameSite=None; Secure; HttpOnly + - AUTH_SESSION_ID_LEGACY=20798378-7c26-494b-b31e-6c3b829dbd70; Version=1; Path=/realms/test/; + HttpOnly + - KC_RESTART=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJjaWQiOiJ0ZXN0aWQiLCJwdHkiOiJvcGVuaWQtY29ubmVjdCIsInJ1cmkiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvZWhlcmtlbm5pbmctYmV3aW5kdm9lcmluZy1vaWRjL2NhbGxiYWNrLyIsImFjdCI6IkFVVEhFTlRJQ0FURSIsIm5vdGVzIjp7InNjb3BlIjoib3BlbmlkIGJzbiIsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9yZWFsbXMvdGVzdCIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwicmVkaXJlY3RfdXJpIjoiaHR0cDovL2xvY2FsaG9zdDo4MDAwL2VoZXJrZW5uaW5nLWJld2luZHZvZXJpbmctb2lkYy9jYWxsYmFjay8iLCJzdGF0ZSI6Im5vdC1hLXJhbmRvbS1zdHJpbmciLCJub25jZSI6Im5vdC1hLXJhbmRvbS1zdHJpbmcifX0.u5Tk3HYN6nuiTuyL-i5bvA4Pp-HF5ocM6alXi12axeg; + Version=1; Path=/realms/test/; HttpOnly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Robots-Tag: + - none + X-XSS-Protection: + - 1; mode=block + content-length: + - '4466' + status: + code: 200 + message: OK +- request: + body: username=eherkenning-vestiging&password=eherkenning-vestiging&credentialId=&login=Sign+In + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '89' + Content-Type: + - application/x-www-form-urlencoded + Cookie: + - AUTH_SESSION_ID_LEGACY=20798378-7c26-494b-b31e-6c3b829dbd70; KC_RESTART=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJjaWQiOiJ0ZXN0aWQiLCJwdHkiOiJvcGVuaWQtY29ubmVjdCIsInJ1cmkiOiJodHRwOi8vbG9jYWxob3N0OjgwMDAvZWhlcmtlbm5pbmctYmV3aW5kdm9lcmluZy1vaWRjL2NhbGxiYWNrLyIsImFjdCI6IkFVVEhFTlRJQ0FURSIsIm5vdGVzIjp7InNjb3BlIjoib3BlbmlkIGJzbiIsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9yZWFsbXMvdGVzdCIsInJlc3BvbnNlX3R5cGUiOiJjb2RlIiwicmVkaXJlY3RfdXJpIjoiaHR0cDovL2xvY2FsaG9zdDo4MDAwL2VoZXJrZW5uaW5nLWJld2luZHZvZXJpbmctb2lkYy9jYWxsYmFjay8iLCJzdGF0ZSI6Im5vdC1hLXJhbmRvbS1zdHJpbmciLCJub25jZSI6Im5vdC1hLXJhbmRvbS1zdHJpbmcifX0.u5Tk3HYN6nuiTuyL-i5bvA4Pp-HF5ocM6alXi12axeg + User-Agent: + - python-requests/2.32.2 + method: POST + uri: http://localhost:8080/realms/test/login-actions/authenticate?session_code=ZdsBr4X9WTVqkjXlM4jY25BmNk6Kk6GiXUnYG2uyjjU&execution=d8b8778e-a545-45d4-8f72-fd69facf4b72&client_id=testid&tab_id=GfAwJIS2IB4 + response: + body: + string: '' + headers: + Cache-Control: + - no-store, must-revalidate, max-age=0 + Content-Security-Policy: + - frame-src 'self'; frame-ancestors 'self'; object-src 'none'; + Location: + - http://localhost:8000/eherkenning-bewindvoering-oidc/callback/?state=not-a-random-string&session_state=20798378-7c26-494b-b31e-6c3b829dbd70&iss=http%3A%2F%2Flocalhost%3A8080%2Frealms%2Ftest&code=b72f7f8d-0968-49f0-a050-3bb66518f54c.20798378-7c26-494b-b31e-6c3b829dbd70.adf4ad83-4550-4619-9231-73bd8d700f45 + Referrer-Policy: + - no-referrer + Set-Cookie: + - KEYCLOAK_LOCALE=; Version=1; Comment=Expiring cookie; Expires=Thu, 01-Jan-1970 + 00:00:10 GMT; Max-Age=0; Path=/realms/test/; HttpOnly + - KC_RESTART=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; + Path=/realms/test/; HttpOnly + - KC_AUTH_STATE=; Version=1; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Max-Age=0; + Path=/realms/test/ + - KEYCLOAK_IDENTITY=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJleHAiOjE3MjAwNDA1MjMsImlhdCI6MTcyMDAwNDUyMywianRpIjoiZTVjZjYwYTEtOGVhNi00MGFlLWIyM2QtMDM3YWYwZTAxZGRkIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy90ZXN0Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y2Y1YjM5IiwidHlwIjoiU2VyaWFsaXplZC1JRCIsInNlc3Npb25fc3RhdGUiOiIyMDc5ODM3OC03YzI2LTQ5NGItYjMxZS02YzNiODI5ZGJkNzAiLCJzaWQiOiIyMDc5ODM3OC03YzI2LTQ5NGItYjMxZS02YzNiODI5ZGJkNzAiLCJzdGF0ZV9jaGVja2VyIjoiVkNKOXdTX2hoY1R0Z2k5UW81Z0FZVDU3bllpUmxRZlh3c21WTUNFYVdZdyJ9.l1xy7YwqVY4eWhefIFYfZYEiQH0RvuKdcgdHDim27UQ; + Version=1; Path=/realms/test/; SameSite=None; Secure; HttpOnly + - KEYCLOAK_IDENTITY_LEGACY=eyJhbGciOiJIUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJlNzE1ZTA1MS02Y2RiLTQ4Y2MtYjRmNC1mMDcyMmM4MWY5ZDMifQ.eyJleHAiOjE3MjAwNDA1MjMsImlhdCI6MTcyMDAwNDUyMywianRpIjoiZTVjZjYwYTEtOGVhNi00MGFlLWIyM2QtMDM3YWYwZTAxZGRkIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3JlYWxtcy90ZXN0Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y2Y1YjM5IiwidHlwIjoiU2VyaWFsaXplZC1JRCIsInNlc3Npb25fc3RhdGUiOiIyMDc5ODM3OC03YzI2LTQ5NGItYjMxZS02YzNiODI5ZGJkNzAiLCJzaWQiOiIyMDc5ODM3OC03YzI2LTQ5NGItYjMxZS02YzNiODI5ZGJkNzAiLCJzdGF0ZV9jaGVja2VyIjoiVkNKOXdTX2hoY1R0Z2k5UW81Z0FZVDU3bllpUmxRZlh3c21WTUNFYVdZdyJ9.l1xy7YwqVY4eWhefIFYfZYEiQH0RvuKdcgdHDim27UQ; + Version=1; Path=/realms/test/; HttpOnly + - KEYCLOAK_SESSION=test/44be45f6-a7ae-42c2-9486-30f078cf5b39/20798378-7c26-494b-b31e-6c3b829dbd70; + Version=1; Expires=Wed, 03-Jul-2024 21:02:03 GMT; Max-Age=36000; Path=/realms/test/; + SameSite=None; Secure + - KEYCLOAK_SESSION_LEGACY=test/44be45f6-a7ae-42c2-9486-30f078cf5b39/20798378-7c26-494b-b31e-6c3b829dbd70; + Version=1; Expires=Wed, 03-Jul-2024 21:02:03 GMT; Max-Age=36000; Path=/realms/test/ + - KEYCLOAK_REMEMBER_ME=; Version=1; Comment=Expiring cookie; Expires=Thu, 01-Jan-1970 + 00:00:10 GMT; Max-Age=0; Path=/realms/test/; HttpOnly + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Robots-Tag: + - none + X-XSS-Protection: + - 1; mode=block + content-length: + - '0' + status: + code: 302 + message: Found +- request: + body: client_id=testid&client_secret=7DB3KUAAizYCcmZufpHRVOcD0TOkNO3I&grant_type=authorization_code&code=b72f7f8d-0968-49f0-a050-3bb66518f54c.20798378-7c26-494b-b31e-6c3b829dbd70.adf4ad83-4550-4619-9231-73bd8d700f45&redirect_uri=http%3A%2F%2Flocalhost%3A8000%2Feherkenning-bewindvoering-oidc%2Fcallback%2F + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + Content-Length: + - '299' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - python-requests/2.32.2 + method: POST + uri: http://localhost:8080/realms/test/protocol/openid-connect/token + response: + body: + string: '{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI0VU5RQWN2VWN2LURGVU94XzRPMWd0MTNPZEpTb3RxRUtQWnVyczJ2UVc4In0.eyJleHAiOjE3MjAwMDQ4MjMsImlhdCI6MTcyMDAwNDUyMywiYXV0aF90aW1lIjoxNzIwMDA0NTIzLCJqdGkiOiJiMGYxYzg4ZS1iM2M4LTRlNmYtYTUxNi1hOTI3NDI4MDgxMDEiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y2Y1YjM5IiwidHlwIjoiQmVhcmVyIiwiYXpwIjoidGVzdGlkIiwibm9uY2UiOiJub3QtYS1yYW5kb20tc3RyaW5nIiwic2Vzc2lvbl9zdGF0ZSI6IjIwNzk4Mzc4LTdjMjYtNDk0Yi1iMzFlLTZjM2I4MjlkYmQ3MCIsImFjciI6IjEiLCJhbGxvd2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ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJlaGVya2VubmluZy12ZXN0aWdpbmciLCJ2ZXN0aWdpbmciOiIxMjM0NTY3ODkwMTIifQ.sKh0TogQVO0o8yS8JgMkXP40FN03gvPva_tGYXjmdag3tF05QPNayeTzWBds1bSoBFOLxjtz7WwuCQ6SKktT-5NC2erBO_kuFGXqtrYuAy1o7RovgESu0mo_9tyeGiNUbqg1wopSfi9UdO3hBw2OUh-WuyXJ6SdufIFAK4g35HoglXn6RoUpzYVYW-uzuuK0pGLQbmZqP42uaoc10eZS388ZvdtgVPpYDOWenCNYMI1OHOf0bC6bgAg5rh9dkP-hWMYPaNvNfGNPf-GoJAtT-fOrlQvSQh9RGQ6O_b5D8aYTNfukyUak1UKfTv6g2aKfldWEsFp2g5AmC0-PPpWmfA","not-before-policy":0,"session_state":"20798378-7c26-494b-b31e-6c3b829dbd70","scope":"openid + email profile kvk groups bsn"}' + headers: + Cache-Control: + - no-store + Content-Type: + - application/json + Pragma: + - no-cache + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - 1; mode=block + content-length: + - '4426' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/certs + response: + body: + string: '{"keys":[{"kid":"4UNQAcvUcv-DFUOx_4O1gt13OdJSotqEKPZurs2vQW8","kty":"RSA","alg":"RS256","use":"sig","n":"2DOZ0qHie73SuFVR7civrl6r82YUiAghfzaMowjCg0o06AF--2lIS7vNV_PbsVVznPAAMqVrNG-8CcevEzvVZMQD9nH4DI7xlOxK0lrYu8rmMeSfOvXVbBVsWBZe0jnGNukZqjwmR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kqhkiG9w0BAQsFAAOCAQEAQGJHeTYSMvp0yndbIn7DLohO9lom5nRrx/bLyb7TiRfogyJEF6rQZ66CAkQFk5eMF878fsHTuMVjtmXVBnhojhVmK91HwjsNQu/8xR6QMXNKJQMvHR245vwUGxlWRw/36ObM1D7QjCd/q+FonpBEY4m5Y6Uz1U0HR2Cbh0E2afVlPLeV+F0LKrlyVMdIaWBGWftCGIKDAHaG/PD66zbAKtxerv2fBIDq100WHPhd57BZxX+2aGJp1IaRDgkxV0E/CjEy3+Knd8xbAgUSW0Tl6OTC75exIvlbzeluEBe0wlapAb7WvBKYsipSW8G8Ey7tjoolDT4AU82EaKUPstiMnA=="],"x5t":"AlfHDI0FOPQpt3RBAILt0dtW1yw","x5t#S256":"a7bhm8-JsnfY7bL_m8Yl72hgmp5516VZlFcVloKzk08"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;charset=UTF-8 + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - 1; mode=block + content-length: + - '2909' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Authorization: + - Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI0VU5RQWN2VWN2LURGVU94XzRPMWd0MTNPZEpTb3RxRUtQWnVyczJ2UVc4In0.eyJleHAiOjE3MjAwMDQ4MjMsImlhdCI6MTcyMDAwNDUyMywiYXV0aF90aW1lIjoxNzIwMDA0NTIzLCJqdGkiOiJiMGYxYzg4ZS1iM2M4LTRlNmYtYTUxNi1hOTI3NDI4MDgxMDEiLCJpc3MiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcmVhbG1zL3Rlc3QiLCJhdWQiOiJhY2NvdW50Iiwic3ViIjoiNDRiZTQ1ZjYtYTdhZS00MmMyLTk0ODYtMzBmMDc4Y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2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl0sInByZWZlcnJlZF91c2VybmFtZSI6ImVoZXJrZW5uaW5nLXZlc3RpZ2luZyIsInZlc3RpZ2luZyI6IjEyMzQ1Njc4OTAxMiJ9.eylwMSvT5F3TqP7aGEs8KDVZ1sXByO1yN7rou-p1W_s0WCleQDhvuqqtiYc9QN2dRTfZPq1mgYZyCyn5CXrEZ55pjAPrHuAgcyII1EmPrxT14sSuskgYiFYLfY9RK-6rxTOMopKtIt7SAlKBwtDT6UN6phpEXE4IpVBWGVq8Z2WUpDzqbaDvWpY24F2HpWNpXJzTZ9YgdXF876Qu1IV-WFhc9S9fyAOPex-yl-V_zve_jOU2iA32heynUsI0uBifEwo6cDNRpFKvRrl09OGDBorr_Q3-gR3rjoabFpigcygLtfnhNX_MV-fMh-zV50yIYHNPmfY1jlffHF7ws1BkSw + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/userinfo + response: + body: + string: eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICI0VU5RQWN2VWN2LURGVU94XzRPMWd0MTNPZEpTb3RxRUtQWnVyczJ2UVc4In0.eyJzdWIiOiI0NGJlNDVmNi1hN2FlLTQyYzItOTQ4Ni0zMGYwNzhjZjViMzkiLCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsInJlcHJlc2VudGVlQlNOIjoiMDAwMDAwMDAwIiwiYWN0aW5nU3ViamVjdElEIjoiNEI3NUEwRUExMDdCM0QzNiIsImlzcyI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MC9yZWFsbXMvdGVzdCIsImdyb3VwcyI6WyJkZWZhdWx0LXJvbGVzLXRlc3QiLCJvZmZsaW5lX2FjY2VzcyIsInVtYV9hdXRob3JpemF0aW9uIl0sInByZWZlcnJlZF91c2VybmFtZSI6ImVoZXJrZW5uaW5nLXZlc3RpZ2luZyIsInZlc3RpZ2luZyI6IjEyMzQ1Njc4OTAxMiIsImF1ZCI6InRlc3RpZCIsInNlcnZpY2VfdXVpZCI6IjgxMjE2ZmE0LTgwYTEtNDY4Ni1hOGFjLTVjOGU1YzAzMGM5MyIsImxlZ2FsU3ViamVjdElEIjoiMTIzNDU2NzgiLCJzZXJ2aWNlX2lkIjoidXJuOmV0b2VnYW5nOkRWOjAwMDAwMDAxMDAyMzA4ODM2MDAwOnNlcnZpY2VzOjkxMTMiLCJuYW1lX3F1YWxpZmllciI6InVybjpldG9lZ2FuZzoxLjk6RW50aXR5Q29uY2VybmVkSUQ6S3ZLbnIifQ.iU0DaCnqIbY20qIbvDpGXu84fLRpG4qWR3h5LLly1d3KjNrpTHkZzIdxPKMIeCrXk79RQFkcYN_zodGY2kymXWFgW0pv89O-ldlJCrUUrPffajEmaCuJdqHWtKLGndNIF57xVz-esnVN4NQaYqEqyaimhkZSRhXlZT7pOeRK9-JVy1BhzzlIxvWEF7fbaDrNbB9Foxoq_G10U2shTFlhUFBh7D2YGv6-IOxuRRhvF39VRyrGasY-9M6mIbA9zbXAznnlJqB-hGOqFKMRPrFkEUhpZ2gPGQl1QGN1od1X9l22mbZmnDoZixMwNTQujVlIjdK3DjFyLD2gnMGJT0g5lA + headers: + Cache-Control: + - no-cache + Content-Type: + - application/jwt + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-XSS-Protection: + - 1; mode=block + content-length: + - '1177' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + User-Agent: + - python-requests/2.32.2 + method: GET + uri: http://localhost:8080/realms/test/protocol/openid-connect/certs + response: + body: + string: '{"keys":[{"kid":"4UNQAcvUcv-DFUOx_4O1gt13OdJSotqEKPZurs2vQW8","kty":"RSA","alg":"RS256","use":"sig","n":"2DOZ0qHie73SuFVR7civrl6r82YUiAghfzaMowjCg0o06AF--2lIS7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AFiWRQwegqcyK9turt21exfUW60Lt2G3Py799xMMpLHC85ylmWNjG7NyM/6xTb97FV/7x6R+Ax1pSru0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAQGJHeTYSMvp0yndbIn7DLohO9lom5nRrx/bLyb7TiRfogyJEF6rQZ66CAkQFk5eMF878fsHTuMVjtmXVBnhojhVmK91HwjsNQu/8xR6QMXNKJQMvHR245vwUGxlWRw/36ObM1D7QjCd/q+FonpBEY4m5Y6Uz1U0HR2Cbh0E2afVlPLeV+F0LKrlyVMdIaWBGWftCGIKDAHaG/PD66zbAKtxerv2fBIDq100WHPhd57BZxX+2aGJp1IaRDgkxV0E/CjEy3+Knd8xbAgUSW0Tl6OTC75exIvlbzeluEBe0wlapAb7WvBKYsipSW8G8Ey7tjoolDT4AU82EaKUPstiMnA=="],"x5t":"AlfHDI0FOPQpt3RBAILt0dtW1yw","x5t#S256":"a7bhm8-JsnfY7bL_m8Yl72hgmp5516VZlFcVloKzk08"}]}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json;charset=UTF-8 + Referrer-Policy: + - no-referrer + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-XSS-Protection: + - 1; mode=block + content-length: + - '2909' + status: + code: 200 + message: OK +version: 1 diff --git a/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/test_auth_context_data.py b/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/test_auth_context_data.py index ce28742b27..55fe233ef9 100644 --- a/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/test_auth_context_data.py +++ b/src/openforms/authentication/contrib/digid_eherkenning_oidc/tests/test_auth_context_data.py @@ -122,6 +122,29 @@ def test_record_auth_context(self): ) self.assertNotIn("representee", auth_context) + @mock_eherkenning_config(branch_number_claim=["vestiging"]) + def test_record_vestiging_restriction(self): + self._login_and_start_form( + "eherkenning_oidc", + username="eherkenning-vestiging", + password="eherkenning-vestiging", + ) + + submission = Submission.objects.get() + self.assertTrue(submission.is_authenticated) + auth_context = submission.auth_info.to_auth_context_data() + + self.assertValidContext(auth_context) + self.assertEqual(auth_context["source"], "eherkenning") + self.assertEqual( + auth_context["authorizee"]["legalSubject"], + { + "identifierType": "kvkNummer", + "identifier": "12345678", + "branchNumber": "123456789012", + }, + ) + @override_settings(ALLOWED_HOSTS=["*"]) class DigiDMachtigenAuthContextTests( @@ -308,3 +331,26 @@ def test_new_required_claims_are_backwards_compatible(self): with self.subTest("legacy structure"): machtigen = submission.auth_info.machtigen self.assertEqual(machtigen, {"identifier_value": "12345678"}) + + @mock_eherkenning_bewindvoering_config(branch_number_claim=["vestiging"]) + def test_record_vestiging_restriction(self): + self._login_and_start_form( + "eherkenning_bewindvoering_oidc", + username="eherkenning-vestiging", + password="eherkenning-vestiging", + ) + + submission = Submission.objects.get() + self.assertTrue(submission.is_authenticated) + auth_context = submission.auth_info.to_auth_context_data() + + self.assertValidContext(auth_context) + self.assertEqual(auth_context["source"], "eherkenning") + self.assertEqual( + auth_context["authorizee"]["legalSubject"], + { + "identifierType": "kvkNummer", + "identifier": "12345678", + "branchNumber": "123456789012", + }, + )