<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi Henri,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks for the quick reply and your troubleshooting.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
I'll work my way through this and let you know how I go.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
regards</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Gary</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<p><span style="font-family: Arial, sans-serif; font-size: 10pt; color: rgb(218, 61, 15);"><b>Gary Lipscomb</b></span></p>
<p><span style="font-family: Arial, sans-serif; font-size: 9pt;">Technical Officer, Systems</span></p>
<p><span style="font-family: Arial, sans-serif; font-size: 9pt;">IT </span><span style="font-family: Arial, sans-serif; font-size: 9pt; color: rgb(65, 65, 65);">Infrastructure & Security | Division of Information Technology</span></p>
<p> </p>
</div>
<div id="appendonsend"></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> users <users-bounces@shibboleth.net> on behalf of Henri Mikkonen <henri.mikkonen@nimbleidm.com><br>
<b>Sent:</b> Thursday, 29 August 2024 16:45<br>
<b>To:</b> users@shibboleth.net <users@shibboleth.net><br>
<b>Subject:</b> Re: Configuring OIDC to use client_credentials - InvalidMessageContext</span>
<div> </div>
</div>
<div style="font-size: 11pt;">Hi Gary,<br>
<br>
I was finally able to reproduce the behaviour with the following remarks:<br>
<br>
- scope 'openid' is registered in the metadata (like you do) and also<br>
requested by the client. This is the main reason for the confusing logs:<br>
the current code is using that scope to signal the use of OpenID Connect<br>
sequence, which is never the case with the client credentials grant. If<br>
you remove the use of that scope, you'll probably see error message with<br>
description "Improper or disallowed resource indicator".<br>
<br>
- The error description above is related to the lack of using resource<br>
indicator in the request, or the client does not have any registered<br>
audiences. See<br>
<a href="https://shibboleth.atlassian.net/wiki/spaces/SC/pages/1912406916/OAuthRPMetadataProfile" id="OWAcbcd3f94-c228-723c-d4cb-d757ceb3b200" class="OWAAutoLink" data-auth="NotApplicable">https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fshibboleth.atlassian.net%2Fwiki%2Fspaces%2FSC%2Fpages%2F1912406916%2FOAuthRPMetadataProfile&data=05%7C02%7Cglipscomb%40csu.edu.au%7C960ba6ad52b74834f9cc08dcc7f6300b%7Cf0f76207a6104fc0b4a35d797fe5283c%7C0%7C0%7C638605107406790513%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=UJh5E4ZJAgrY4TIGgw2PA8Gle7kAeinlav8FT4pjHwI%3D&reserved=0</a><br>
. The logic is that unless the client requests any specific resource,<br>
the first registered audience is used as the access token<br>
target/audience. In any case, the registered resources need to have<br>
OAUTH2.TokenAudience profile enabled. You should have that covered as<br>
you've enabled it via DefaultRelyingParty.<br>
<br>
Regarding the scopes, until OP 4.1.0 you need to be using some scope<br>
value in the request. See <a href="https://shibboleth.atlassian.net/browse/JOIDC-176" id="OWA14a2df8b-e3c9-dbc9-c901-e4326c0c778c" class="OWAAutoLink" data-auth="NotApplicable">
https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fshibboleth.atlassian.net%2Fbrowse%2FJOIDC-176&data=05%7C02%7Cglipscomb%40csu.edu.au%7C960ba6ad52b74834f9cc08dcc7f6300b%7Cf0f76207a6104fc0b4a35d797fe5283c%7C0%7C0%7C638605107406801278%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=9SsFLo2UGA31lODR72xruDw2QzlwNli3P%2FXkVVZWtpk%3D&reserved=0</a><br>
<br>
BR,<br>
Henri.<br>
<br>
On 29.8.2024 5.58, Lipscomb, Gary via users wrote:<br>
> Hi List,<br>
><br>
> Environment<br>
><br>
>   *<br>
>     RHEL 8<br>
>   *<br>
>     IdP 4.3.3  (currently  migrating to 5.1.3)<br>
>   *<br>
>     Plugins<br>
>       o<br>
>         Plugin: net.shibboleth.oidc.common      Current Version: 2.2.1<br>
>       o<br>
>         Plugin: net.shibboleth.idp.plugin.oidc.config   Current Version:<br>
>         1.0.1<br>
>       o<br>
>         Plugin: net.shibboleth.idp.plugin.oidc.op       Current Version:<br>
>         3.4.0<br>
>   *<br>
>     Java openjdk version "11.0.24"<br>
><br>
> I think I've got the authentication working but I'm getting this in the log<br>
><br>
> 2024-08-29 10:13:54,603 - IP REDACTED - INFO<br>
> [net.shibboleth.idp.plugin.oidc.op.authn.impl.OIDCClientInfoCredentialValidator:152] - Credential Validator oauth2-clientinfo: Login by '<a href="https://redacted.csu.edu.au/oidc" id="OWAfa95c060-4e9a-4ba1-b612-11dbfd11849f" class="OWAAutoLink" data-auth="NotApplicable">https://REDACTED.csu.edu.au/oidc</a>'
 succeeded<br>
> 2024-08-29 10:13:54,603 -IP REDACTED - INFO<br>
> [net.shibboleth.idp.authn.impl.FinalizeAuthentication:196] - Profile<br>
> Action FinalizeAuthentication: Principal <a href="https://REDACTED" id="OWA71639ee7-8dc4-cfd7-8d6c-47aa73da75b1" class="OWAAutoLink" data-auth="NotApplicable">
https://REDACTED</a><br>
> <<a href="https://REDACTED" id="OWA8e4b0428-0c93-e659-f394-2e0cdca1d6ac" class="OWAAutoLink" data-auth="NotApplicable">https://REDACTED</a>>.csu.edu.au/oidc authenticated<br>
> 2024-08-29 10:13:54,604 - IP REDACTED - ERROR<br>
> [net.shibboleth.idp.plugin.oidc.op.profile.impl.InitializeRelyingPartyContext:144] - resource/audience ID Unable to obtain Profile Action InitializeRelyingPartyContext:<br>
> 2024-08-29 10:13:54,605 - IP REDACTED - WARN<br>
> [org.opensaml.profile.action.impl.LogEvent:101] - A non-proceed event<br>
> occurred while processing the request: I*nvalidMessageContext*<br>
> 2024-08-29 10:13:54,606 -IP REDACTED - INFO<br>
> [Shibboleth-Audit.OIDC.Token:338] -<br>
> 54.86.50.139|2024-08-29T00:13:54.582866Z|2024-08-29T00:13:54.606339Z|https://REDACTED.csu.edu.au/oidc|https://archibusqaupgrade.csu.edu.au/oidc|||2024-08-29T00:13:54.603402Z||https://REDACTED.csu.edu.au/oidc||false|||TokenRequest|TokenErrorResponse|||||PostmanRuntime/7.41.2<br>
><br>
> I've added<br>
>                  <ref bean="OAUTH2.Token" /><br>
>                  <ref bean="OAUTH2.TokenAudience" /><br>
> to the DefaultRelyingParty and my RelyingPartyOverrides but not to the<br>
> UnverifiedRelyingParty<br>
><br>
> The SP information is held in metadata<br>
>          <oidcmd:OAuthRPExtensions<br>
>            grant_types="client_credentials"<br>
>            response_types="code token id_token"<br>
>            token_endpoint_auth_method="client_secret_post"<br>
>            scopes="openid profile" /><br>
>        </md:Extensions><br>
><br>
><br>
> Any help on troubleshooting would be greatly appreciated<br>
><br>
> regards<br>
><br>
> Gary<br>
><br>
> *Gary Lipscomb*<br>
><br>
> Technical Officer, Systems<br>
><br>
> IT Infrastructure & Security | Division of Information Technology<br>
><br>
> Charles Sturt University, Bathurst, NSW 2795<br>
><br>
> Charles Sturt University<br>
><br>
> Charles Sturt <<a href="https://www.csu.edu.au/" id="OWA51ba97e5-b15f-fc2a-35c0-a58a30bd364d" class="OWAAutoLink" data-auth="NotApplicable">https://www.csu.edu.au</a>><br>
><br>
> ------------------------------------------------------------------------<br>
><br>
> LEGAL NOTICE<br>
><br>
> This email (including correspondence comprising an email chain and any<br>
> attachment) is confidential and is intended for the use of the<br>
> addressee(s) only. If you are not the intended recipient of this email,<br>
> you must not copy, distribute, take any action in reliance on it or<br>
> disclose it to anyone.<br>
> Any confidentiality is not waived or lost by reason of mistaken<br>
> delivery. Any email should be checked for viruses and defects before<br>
> opening. Charles Sturt University does not accept liability for viruses<br>
> or any consequence which arise as a result of this email transmission.<br>
> Email communications with Charles Sturt University may be subject to<br>
> automated email filtering, which could result in the delay or deletion<br>
> of a legitimate email before it is read at Charles Sturt University. The<br>
> views expressed in this email are not necessarily those of Charles Sturt<br>
> University.<br>
><br>
> Charles Sturt University in Australia <<a href="https://www.csu.edu.au/" id="OWAc0ab7f86-57d0-f803-fda3-bc340bc79d3a" class="OWAAutoLink" data-auth="NotApplicable">https://www.csu.edu.au</a>> The<br>
> Grange Chancellery, Panorama Avenue, Bathurst NSW Australia 2795 (ABN:<br>
> 83 878 708 551). Charles Sturt University - TEQSA Provider<br>
> Identification: PRV12018 (Australian University). CRICOS Provider: 00005F.<br>
><br>
> Consider the environment before printing this email.<br>
><br>
><br>
--<br>
For Consortium Member technical support, see <a href="https://shibboleth.atlassian.net/wiki/x/ZYEpPw" id="OWA342e2d9a-9b93-d192-152a-22c5e7a20744" class="OWAAutoLink" data-auth="NotApplicable">
https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fshibboleth.atlassian.net%2Fwiki%2Fx%2FZYEpPw&data=05%7C02%7Cglipscomb%40csu.edu.au%7C960ba6ad52b74834f9cc08dcc7f6300b%7Cf0f76207a6104fc0b4a35d797fe5283c%7C0%7C0%7C638605107406807641%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=paFZnahXEWV7cZjtyegxbxirGgMjMoR4B%2FYaavDJ5hs%3D&reserved=0</a><br>
To unsubscribe from this list send an email to users-unsubscribe@shibboleth.net</div>
<!DOCTYPE html>
<title>Charles Sturt University</title>
<style>p {font-family:arial, helvetica, sans-serif;font-size:9px;}</style>
<p><a href="https://www.csu.edu.au/" style="text-decoration:none;"><img alt="Charles Sturt" style="height:60px;padding:10px;" src="https://www.csu.edu.au/email/images/charles-sturt-logo/charles-sturt-university-logo.png"></a></p>
<hr>
<p style="font-weight:bold">LEGAL NOTICE</p>
<p>This email (including correspondence comprising an email chain and any attachment) is confidential and is intended for the use of the addressee(s) only. If you are not the intended recipient of this email, you must not copy, distribute, take any action in
 reliance on it or disclose it to anyone.<br>
Any confidentiality is not waived or lost by reason of mistaken delivery. Any email should be checked for viruses and defects before opening. Charles Sturt University does not accept liability for viruses or any consequence which arise as a result of this email
 transmission. Email communications with Charles Sturt University may be subject to automated email filtering, which could result in the delay or deletion of a legitimate email before it is read at Charles Sturt University. The views expressed in this email
 are not necessarily those of Charles Sturt University.</p>
<p><a style="color:#da3d0f;" href="https://www.csu.edu.au/">Charles Sturt University in Australia</a> The Grange Chancellery, Panorama Avenue, Bathurst NSW Australia 2795 (ABN: 83 878 708 551). Charles Sturt University - TEQSA Provider Identification: PRV12018
 (Australian University). CRICOS Provider: 00005F.</p>
<p>Consider the environment before printing this email.</p>
</body>
</html>