<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Changes to client registration and access token generation on the SAS Viya platform -- Please Read! in Developers</title>
    <link>https://communities.sas.com/t5/Developers/Changes-to-client-registration-and-access-token-generation-on/m-p/860003#M6323</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="Developers_Lightbulb-Two-Color.png" style="width: 261px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80677i21B956EF8FCF7321/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Developers_Lightbulb-Two-Color.png" alt="Developers_Lightbulb-Two-Color.png" /&gt;&lt;/span&gt;I wanted to bring to your attention a couple of changes for SAS Viya 2023.1 concerning the use of the Consul token in client registration and the scopes and authorities attributes.&amp;nbsp;I've updated my blog post&lt;A href="https://blogs.sas.com/content/sgf/2023/02/07/authentication-to-sas-viya/" target="_self"&gt;&amp;nbsp;Authentication to SAS Viya: a couple of approaches&lt;/A&gt;, which provides more details and examples. I've also updated the &lt;A href="https://github.com/sassoftware/rest-api-use-cases/blob/main/python/authentication/registerClient_generateToken_Python_2023.ipynb" target="_self"&gt;Python notebook script&lt;/A&gt; that registers a client and generates an access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a welcome change, as SAS admins no longer need SAS Viya server access to register a client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Consul Token&lt;/H2&gt;
&lt;P&gt;The use of the&amp;nbsp;SAS Configuration Server (Consul) token is no longer required to generate an access token for use in client (application) registration. Rather, a user in the SASAdministrators group can generate the token. See the blog post reference above for detailed commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Scopes and Authorities&lt;/H2&gt;
&lt;P&gt;The changes for scopes and authorities attributes in client registration now closely align with OpenID Connect standards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Scopes&lt;/H3&gt;
&lt;P&gt;The list of scopes allows for the client to obtain on behalf of users, when using any grant type other than “client_credentials”. For most SAS Viya APIs, “openid” and “uaa.user” are sufficient. Previously, SAS user groups were listed under scopes. Now, user groups are handled under the authorities parameter. &lt;STRONG&gt;Please note&lt;/STRONG&gt; however, that the SASAdministrators group is still handled under scopes. This was done so that a user must opt-in to SASAdministrators when getting an authorization code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For client applications that only use the grant type “client_credentials” and therefore do not act on behalf of users, use the default scope “uaa.none”.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;&lt;STRONG&gt;Grant Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;&lt;STRONG&gt;Recommended Values&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;authorization_code&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;openid, uaa.user, (SASAdministrators in some cases)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;password&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;openid, uaa.user,&amp;nbsp;(SASAdministrators in some cases)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;client_credentials&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;uaa.none&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Authorities&lt;/H3&gt;
&lt;P&gt;For use with "client credentials" grant type.&amp;nbsp; Authorities specify the SAS groups the tokens inherit. &lt;SPAN&gt;&lt;SPAN class="ui-provider zh b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;For “authorization_code” and “password” grants, all SAS user groups are assumed and included.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;You do not pass the authorities attribute when using authorization_code or password grant types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Grant Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Recommended Values&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;client_credentials&lt;/TD&gt;
&lt;TD width="50%"&gt;Explicit SAS user groups&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Questions?&lt;/H2&gt;
&lt;P&gt;If you have further questions, please put them in the Comments section and we'll get back to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2023 18:56:12 GMT</pubDate>
    <dc:creator>joeFurbee</dc:creator>
    <dc:date>2023-02-27T18:56:12Z</dc:date>
    <item>
      <title>Changes to client registration and access token generation on the SAS Viya platform -- Please Read!</title>
      <link>https://communities.sas.com/t5/Developers/Changes-to-client-registration-and-access-token-generation-on/m-p/860003#M6323</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-right" image-alt="Developers_Lightbulb-Two-Color.png" style="width: 261px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80677i21B956EF8FCF7321/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Developers_Lightbulb-Two-Color.png" alt="Developers_Lightbulb-Two-Color.png" /&gt;&lt;/span&gt;I wanted to bring to your attention a couple of changes for SAS Viya 2023.1 concerning the use of the Consul token in client registration and the scopes and authorities attributes.&amp;nbsp;I've updated my blog post&lt;A href="https://blogs.sas.com/content/sgf/2023/02/07/authentication-to-sas-viya/" target="_self"&gt;&amp;nbsp;Authentication to SAS Viya: a couple of approaches&lt;/A&gt;, which provides more details and examples. I've also updated the &lt;A href="https://github.com/sassoftware/rest-api-use-cases/blob/main/python/authentication/registerClient_generateToken_Python_2023.ipynb" target="_self"&gt;Python notebook script&lt;/A&gt; that registers a client and generates an access token.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a welcome change, as SAS admins no longer need SAS Viya server access to register a client.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Consul Token&lt;/H2&gt;
&lt;P&gt;The use of the&amp;nbsp;SAS Configuration Server (Consul) token is no longer required to generate an access token for use in client (application) registration. Rather, a user in the SASAdministrators group can generate the token. See the blog post reference above for detailed commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Scopes and Authorities&lt;/H2&gt;
&lt;P&gt;The changes for scopes and authorities attributes in client registration now closely align with OpenID Connect standards.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Scopes&lt;/H3&gt;
&lt;P&gt;The list of scopes allows for the client to obtain on behalf of users, when using any grant type other than “client_credentials”. For most SAS Viya APIs, “openid” and “uaa.user” are sufficient. Previously, SAS user groups were listed under scopes. Now, user groups are handled under the authorities parameter. &lt;STRONG&gt;Please note&lt;/STRONG&gt; however, that the SASAdministrators group is still handled under scopes. This was done so that a user must opt-in to SASAdministrators when getting an authorization code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For client applications that only use the grant type “client_credentials” and therefore do not act on behalf of users, use the default scope “uaa.none”.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;&lt;STRONG&gt;Grant Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;&lt;STRONG&gt;Recommended Values&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;authorization_code&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;openid, uaa.user, (SASAdministrators in some cases)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;password&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;openid, uaa.user,&amp;nbsp;(SASAdministrators in some cases)&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%" height="30px"&gt;client_credentials&lt;/TD&gt;
&lt;TD width="50%" height="30px"&gt;uaa.none&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;Authorities&lt;/H3&gt;
&lt;P&gt;For use with "client credentials" grant type.&amp;nbsp; Authorities specify the SAS groups the tokens inherit. &lt;SPAN&gt;&lt;SPAN class="ui-provider zh b c d e f g h i j k l m n o p q r s t u v w x y z ab ac ae af ag ah ai aj ak"&gt;For “authorization_code” and “password” grants, all SAS user groups are assumed and included.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;You do not pass the authorities attribute when using authorization_code or password grant types.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Grant Type&lt;/STRONG&gt;&lt;/TD&gt;
&lt;TD width="50%"&gt;&lt;STRONG&gt;Recommended Values&lt;/STRONG&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;client_credentials&lt;/TD&gt;
&lt;TD width="50%"&gt;Explicit SAS user groups&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Questions?&lt;/H2&gt;
&lt;P&gt;If you have further questions, please put them in the Comments section and we'll get back to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 18:56:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/Changes-to-client-registration-and-access-token-generation-on/m-p/860003#M6323</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2023-02-27T18:56:12Z</dc:date>
    </item>
  </channel>
</rss>

