<?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 Re: Store secrets - SAS 9.4M4 in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948709#M29157</link>
    <description>&lt;P&gt;Thank you for the suggestion&lt;/P&gt;</description>
    <pubDate>Wed, 23 Oct 2024 10:31:31 GMT</pubDate>
    <dc:creator>freshstarter</dc:creator>
    <dc:date>2024-10-23T10:31:31Z</dc:date>
    <item>
      <title>Store secrets - SAS 9.4M4</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948660#M29149</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are in SAS 9.4M7 and recently we have written SAS code proc http post method to generate and extract oauth token from Microsoft Azure. As this is the test environment, we have hardcoded the client id and client secrets in the SAS code to retrive the token. But we cant take this approach in Production as these details should be masked (or) invisible where end users should not see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thought of using Azure key vault to store these secrets, but we cant use proc python in SAS 9.4 as proc python is available only in SAS Viya. We dont want to store these secrets in a file that resides on the server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are there are any ways where we can store these secrets securely and retrive that in SAS code efficiently ? Please let me know. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 20:32:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948660#M29149</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2024-10-22T20:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Store secrets - SAS 9.4M4</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948661#M29150</link>
      <description>&lt;P&gt;Can you post your test code example so we can get a better idea of what you are doing?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 20:39:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948661#M29150</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-10-22T20:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Store secrets - SAS 9.4M4</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948663#M29151</link>
      <description>Could you build the PROC HTTP call with the hardcoded client ID and secret into a compiled macro? The users could run the macro to get the token but not be able to see the source code that contains the secret.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n0sjezyl65z1cpn1b6mqfo8115h2.htm" target="_blank"&gt;https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/n0sjezyl65z1cpn1b6mqfo8115h2.htm&lt;/A&gt;</description>
      <pubDate>Tue, 22 Oct 2024 20:56:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948663#M29151</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-10-22T20:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Store secrets - SAS 9.4M4</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948664#M29152</link>
      <description>&lt;P&gt;Below is my code where the client_id and secrets are hardcoded now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;filename resp temp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc http&lt;/P&gt;
&lt;P&gt;url="&lt;A href="https://login.microsoftonline.com/" target="_blank"&gt;https://login.microsoftonline.com/&lt;/A&gt;&amp;lt;Tenant-id&amp;gt;/oauth2/v2.0/token"&lt;/P&gt;
&lt;P&gt;in='grant_type=client_credentails&amp;amp;client_id=&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;1234567-abc&lt;/STRONG&gt;&lt;/FONT&gt;&amp;amp;client_secret=&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;123dbc-oG&lt;/STRONG&gt;&lt;/FONT&gt;&amp;amp;scope=api://erderf/.default'&lt;/P&gt;
&lt;P&gt;ct="application/x-www-form-urlencoded"&lt;/P&gt;
&lt;P&gt;out=resp&lt;/P&gt;
&lt;P&gt;method='POST';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname auth json fileref=resp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;/P&gt;
&lt;P&gt;set auth.root;&lt;/P&gt;
&lt;P&gt;call.symputx('token',access_token);&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%put &amp;amp;token;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 21:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948664#M29152</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2024-10-22T21:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Store secrets - SAS 9.4M4</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948673#M29153</link>
      <description>&lt;P&gt;To amend what Greg suggested, you'll want to use both the STORE and the SECURE options.&lt;BR /&gt;STORE provides macro compilation; SECURE provides encryption (so nosy people turning on MPRINT, etc get nada, zip, zilch)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;See&amp;nbsp;&lt;A href="https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/mcrolref/p1nypovnwon4uyn159rst8pgzqrl.htm#p05y391rq3drjgn1pv40fng2kc3u" target="_self"&gt;Example 5: Using the %MACRO Statement with the STORE and SECURE Options&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Carl Sommer - SAS Technical Support&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2024 22:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948673#M29153</guid>
      <dc:creator>carl_sommer</dc:creator>
      <dc:date>2024-10-22T22:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Store secrets - SAS 9.4M4</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948709#M29157</link>
      <description>&lt;P&gt;Thank you for the suggestion&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2024 10:31:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Store-secrets-SAS-9-4M4/m-p/948709#M29157</guid>
      <dc:creator>freshstarter</dc:creator>
      <dc:date>2024-10-23T10:31:31Z</dc:date>
    </item>
  </channel>
</rss>

