<?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 Viya 3.5 - Creation of Authentication domain from code in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/752537#M22563</link>
    <description>&lt;P&gt;Hi community,&lt;/P&gt;
&lt;P&gt;I'm able to create authenticated domain in the Environment Manager.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dandycomp_0-1625660801454.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61007i6D7439A58E8A7372/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dandycomp_0-1625660801454.png" alt="dandycomp_0-1625660801454.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to create a new AuthDomain from CLI or REST API call? Could you please provide an example of it. I haven't found any documentation about the creation of authenticated-domain from REST API or CLI.&lt;/P&gt;
&lt;P&gt;There is a piece of code in Python &lt;A href="https://github.com/sassoftware/pyviyatools/blob/master/createdomain.py" target="_self"&gt;link&lt;/A&gt;, but I'm not as familiar with Python to translate it to REST API call.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Jul 2021 12:31:15 GMT</pubDate>
    <dc:creator>idziemianczyk</dc:creator>
    <dc:date>2021-07-07T12:31:15Z</dc:date>
    <item>
      <title>Viya 3.5 - Creation of Authentication domain from code</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/752537#M22563</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;
&lt;P&gt;I'm able to create authenticated domain in the Environment Manager.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dandycomp_0-1625660801454.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/61007i6D7439A58E8A7372/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dandycomp_0-1625660801454.png" alt="dandycomp_0-1625660801454.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to create a new AuthDomain from CLI or REST API call? Could you please provide an example of it. I haven't found any documentation about the creation of authenticated-domain from REST API or CLI.&lt;/P&gt;
&lt;P&gt;There is a piece of code in Python &lt;A href="https://github.com/sassoftware/pyviyatools/blob/master/createdomain.py" target="_self"&gt;link&lt;/A&gt;, but I'm not as familiar with Python to translate it to REST API call.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Jul 2021 12:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/752537#M22563</guid>
      <dc:creator>idziemianczyk</dc:creator>
      <dc:date>2021-07-07T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Viya 3.5 - Creation of Authentication domain from code</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/752548#M22566</link>
      <description>Yes, this is possible through the credentials REST API using a PUT call to the endpoint /credentials/domains/{domain_id}. This would either create an authentication domain with that ID or update it if it already exists.&lt;BR /&gt;&lt;BR /&gt;The body would contain the id and type, and optionally a description and label. For example:&lt;BR /&gt;&lt;BR /&gt;curl --location --request PUT '&lt;A href="http://viya.demo.sas.com/credentials/domains/TestDomain" target="_blank"&gt;http://viya.demo.sas.com/credentials/domains/TestDomain&lt;/A&gt;' \&lt;BR /&gt;--header 'Accept: application/vnd.sas.credential.domain+json, application/json' \&lt;BR /&gt;--header 'Content-Type: application/json' \&lt;BR /&gt;--header 'Authorization: Bearer &amp;lt;token&amp;gt;' \&lt;BR /&gt;--data-raw '{&lt;BR /&gt;  "id": "TestDomain",&lt;BR /&gt;  "description": "This is a test domain.",&lt;BR /&gt;  "label": "label",&lt;BR /&gt;  "type": "password"&lt;BR /&gt;}'</description>
      <pubDate>Wed, 07 Jul 2021 13:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/752548#M22566</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2021-07-07T13:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: Viya 3.5 - Creation of Authentication domain from code</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/814270#M24430</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78975"&gt;@gwootton&lt;/a&gt;, thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have an idea if we can add USER and PASSWORD into this(or another) into the Authdomain + assign it to groups?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't find any examples of creation PUT request for Authdomain credentials.&amp;nbsp;I can only check existing credentials with the following GET request.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;GET https://&amp;lt;server&amp;gt;/credentials/domains/TestDomain/credentials&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please help me to build PUT request for adding credentials:&lt;/P&gt;
&lt;P&gt;USER + PASSWORD and assign the access to groups.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For eg.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;USER: ORACLE_TEST&lt;/P&gt;
&lt;P&gt;PASSWORD: ORACLE_PASS&lt;/P&gt;
&lt;P&gt;Credentials: &lt;SPAN&gt;SASAdministrators, DataBuilders&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 19 May 2022 11:46:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/814270#M24430</guid>
      <dc:creator>idziemianczyk</dc:creator>
      <dc:date>2022-05-19T11:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Viya 3.5 - Creation of Authentication domain from code</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/814319#M24435</link>
      <description>Yes the endpoint for adding credentials to an authentication domain for a group would be specific to the group so you'd need to do one for SASAdministrators and one for DataBuilders in your example (or make a new group that both SASAdministrators and DataBuilders is a member of and add it to that):&lt;BR /&gt;&lt;BR /&gt;PUT /credentials/domains/{{ domain id}}/groups/{{ group id }}&lt;BR /&gt;&lt;BR /&gt;with a body&lt;BR /&gt;'{&lt;BR /&gt;  "domainId": "{{ domain id }}",&lt;BR /&gt;  "identityType": "group",&lt;BR /&gt;  "identityId": "{{ group id }}",&lt;BR /&gt;  "domainType": "password",&lt;BR /&gt;  "properties": {&lt;BR /&gt;    "userId": "ORACLE_TEST"&lt;BR /&gt;  },&lt;BR /&gt;  "secrets": {&lt;BR /&gt;    "password": "{{ base 64 encoded password }}"&lt;BR /&gt;  }&lt;BR /&gt;}'&lt;BR /&gt;&lt;BR /&gt;You can use the command "base64" to encode the password, the -n prevents echo from sending a newline character:&lt;BR /&gt;&lt;BR /&gt;$ echo -n "ORACLE_PASS" | base64 &lt;BR /&gt;T1JBQ0xFX1BBU1M=</description>
      <pubDate>Thu, 19 May 2022 15:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Viya-3-5-Creation-of-Authentication-domain-from-code/m-p/814319#M24435</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2022-05-19T15:57:24Z</dc:date>
    </item>
  </channel>
</rss>

