<?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: Read only Permission to Redshift table via SAS DI studio in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929753#M28546</link>
    <description>&lt;P&gt;I think your primary issue relates to understanding how the Read/Write/Created/Delete/... metadata permissions are implemented. ReadMetadata, WriteMetadata and CheckInMetadata are used to control the ability to view and update SAS metadata for the library and Read, Write, Create and Delete &lt;EM&gt;&lt;STRONG&gt;can&lt;/STRONG&gt;&lt;/EM&gt; be used to control the ability to view and update the data behind the library, but only in certain circumstances. In order for Read, Write, Create and Delete to be enforced, the library has to be assigned using an engine that supports and enforces them, such as the SAS Metadata Libname Engine. You also need to consider the possibility of users attempting to bypass the use of that library engine. The simplest and most robust thing to do is to instead enforce those data level permissions in the underlying data source itself, in this case Redshift. Since you are already using 2 possible shared logins, one for read/write access and one for read-only access, I would suggest making sure those logins in Redshift only have that level of access to the data. That way the data level permissions are enforced there and in SAS metadata you just need to make sure that users only have access to one appropriate shared login. Use a single Redshift authentication domain and put the shared read/write access login on one group (Redshift Write Users) and the shared read access login on the other group (Redshift Read Only Users). Finally, ensure a user is only a member of one group or the other (either via direct or appropriate nested membership) depending on the access they should have.&lt;/P&gt;</description>
    <pubDate>Mon, 27 May 2024 02:06:49 GMT</pubDate>
    <dc:creator>PaulHomes</dc:creator>
    <dc:date>2024-05-27T02:06:49Z</dc:date>
    <item>
      <title>Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929752#M28545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am new to SAS Admin. I am looking to give read-only permission to Redshift tables in SAS DI Studio for a specific SAS user group in &lt;STRONG&gt;PROD&lt;/STRONG&gt; environment.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Example:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;CDP SAS Users&lt;/STRONG&gt; Group - I have assigned it to &lt;EM&gt;Redshift Read Only Users&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YNWA1_0-1716772547520.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96778i497CC72E38D6E89D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YNWA1_0-1716772547520.png" alt="YNWA1_0-1716772547520.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have 2 set of auth domains I have created for 2 groups&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YNWA1_5-1716773263932.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96783i8D360D2A7748126C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YNWA1_5-1716773263932.png" alt="YNWA1_5-1716773263932.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YNWA1_1-1716772616925.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96779iE40148E11169106E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YNWA1_1-1716772616925.png" alt="YNWA1_1-1716772616925.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YNWA1_2-1716772647038.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96780i2440EB9DB5733E55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YNWA1_2-1716772647038.png" alt="YNWA1_2-1716772647038.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a library to Redshift access using &lt;STRONG&gt;CDP_Redshift_Prod&lt;/STRONG&gt; as the write access to Redshift. See below&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;LIBNAME ROCOUR SASIORST DSN=prod_cdp_ods_sas SCHEMA=xxxx AUTHDOMAIN="&lt;STRONG&gt;CDP_Redshift_Prod&lt;/STRONG&gt;" ;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My issue is, I only want to give users of the&amp;nbsp;&lt;STRONG&gt;CDP SAS Users&lt;/STRONG&gt;&amp;nbsp;to have read-only metadata and read only data to the redshift tables. How can I achieve this as I cannot change the configuration of the existing library to use &lt;EM&gt;CDP_Redshift_Prod_RO&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried using the &lt;EM&gt;Redshift Write Users&lt;/EM&gt; group to &lt;EM&gt;CDP SAS Users&lt;/EM&gt; and giving only read only via ACT but I can still write to the Redshift table.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YNWA1_3-1716773190413.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96781i6A1C822BF10EC685/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YNWA1_3-1716773190413.png" alt="YNWA1_3-1716773190413.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="YNWA1_4-1716773207410.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96782i3159CADBECB6DAE0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YNWA1_4-1716773207410.png" alt="YNWA1_4-1716773207410.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help you be more than welcome.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 01:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929752#M28545</guid>
      <dc:creator>YNWA1</dc:creator>
      <dc:date>2024-05-27T01:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929753#M28546</link>
      <description>&lt;P&gt;I think your primary issue relates to understanding how the Read/Write/Created/Delete/... metadata permissions are implemented. ReadMetadata, WriteMetadata and CheckInMetadata are used to control the ability to view and update SAS metadata for the library and Read, Write, Create and Delete &lt;EM&gt;&lt;STRONG&gt;can&lt;/STRONG&gt;&lt;/EM&gt; be used to control the ability to view and update the data behind the library, but only in certain circumstances. In order for Read, Write, Create and Delete to be enforced, the library has to be assigned using an engine that supports and enforces them, such as the SAS Metadata Libname Engine. You also need to consider the possibility of users attempting to bypass the use of that library engine. The simplest and most robust thing to do is to instead enforce those data level permissions in the underlying data source itself, in this case Redshift. Since you are already using 2 possible shared logins, one for read/write access and one for read-only access, I would suggest making sure those logins in Redshift only have that level of access to the data. That way the data level permissions are enforced there and in SAS metadata you just need to make sure that users only have access to one appropriate shared login. Use a single Redshift authentication domain and put the shared read/write access login on one group (Redshift Write Users) and the shared read access login on the other group (Redshift Read Only Users). Finally, ensure a user is only a member of one group or the other (either via direct or appropriate nested membership) depending on the access they should have.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 02:06:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929753#M28546</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2024-05-27T02:06:49Z</dc:date>
    </item>
    <item>
      <title>Re: Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929754#M28547</link>
      <description>&lt;P&gt;Below superseded by Paul Holmes advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a metadate level this should just be about group memberships.&lt;/P&gt;
&lt;P&gt;On a physical level: DB access is granted by the credentials stored in the authdomain so everyone with read access to this authdomain will have the same access (use the same credentials). Anyone can also issue their own libname statement using this authdomain so the only way to secure this is via read/no read to the authdomain metadata object.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your library is pre-assigned (=DIS won't generate a libname statement) then a "hack" to get what you want could be:&lt;/P&gt;
&lt;P&gt;1. Create another authdomain &lt;EM&gt;CDP_Redshift_Prod_RO&lt;/EM&gt; with a user that got only read access to the DB&lt;/P&gt;
&lt;P&gt;2. Only give users with write access to Redshift metadata read access to authdomain&amp;nbsp;&lt;EM&gt;CDP_Redshift_Prod&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;3. In the autoexec check metadata membership of the user under which the process executes. If this user isn't in the group for write access to Redshift but is in the group for read access to Redshift then issue libname statement&amp;nbsp;&lt;EM&gt;LIBNAME ROCOUR SASIORST DSN=prod_cdp_ods_sas SCHEMA=xxxx AUTHDOMAIN="&lt;STRONG&gt;CDP_Redshift_Prod_RO&lt;/STRONG&gt; " ;&lt;/EM&gt; which then will overwrite the pre-assigned one.&lt;/P&gt;
&lt;P&gt;This "overwrite" libname statement must be in a usermods autoexec that gets processed both by batch and online sessions (like in the usermods under the App server).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This approach is not perfect and you need to ensure to keep this coded libname statement fully in sync with the metadata definition of the pre-assigned version.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 03:45:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929754#M28547</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-05-27T03:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929755#M28548</link>
      <description>&lt;P&gt;It looks like you are using a service account to access Redshift. I suggest you switch the current service account for one that has only read-only access, but leave the rest of the Authentication Domain the same. Note, you can't enforce read-only access via metadata permissions alone, as these can always be bypassed by assigning a LIBNAME in code if the user has access to a write-capable account.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 02:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929755#M28548</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-05-27T02:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929756#M28549</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Use a single Redshift authentication domain and put the shared read/write access login on one group (Redshift Write Users) and the shared read access login on the other group (Redshift Read Only Users). Finally, ensure a user is only a member of one group or the other (either via direct or appropriate nested membership) depending on the access they should have.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18432"&gt;@PaulHomes&lt;/a&gt;&amp;nbsp;So with a single pre-assigned library that uses an authdomain how does this work? Can you define two user ids/pw for the same authdomain and then secure who gets access/uses which one?&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 02:23:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929756#M28549</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-05-27T02:23:53Z</dc:date>
    </item>
    <item>
      <title>Re: Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929763#M28550</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; Yes, you can have 2 different logins in the same auth domain on 2 different groups and let SAS automatically pick the right one for you. There is nothing special that has to be done to secure them - you only have access to logins on your own identity or on any group within your identity hierarchy (unless you are unrestricted in which case you can see all logins but have no access to their passwords). When SAS (9.2 onwards) needs a login it will walk your identity hierarchy and find the login for the required auth domain that is closest to you in your identity hierarchy i.e. on your identity, then your direct groups memberships , then second level via nested groups etc.&amp;nbsp; I just verified this with 2 different users in 2 different groups where those groups have different logins in the same auth domain. I created a made up ODBC library for a made up ODBC data server tagged with that same auth domain. When the libname is not pre-assigned, so you can use Display Libname Statement in SAS MC Data Library Manager, those users see their correct shared logins.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the library is pre-assigned, and used in a normally configured SAS Workspace Server, it should use the metadata identity of the launch user to find the appropriate login in the same way. I don't have a readily available SAS/Access accessible ODBC database to hand to double check this all the way through to the database itself but that is my understanding.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 03:29:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929763#M28550</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2024-05-27T03:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Read only Permission to Redshift table via SAS DI studio</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929764#M28551</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/394439"&gt;@YNWA1&lt;/a&gt; - I also forgot to mention that, being a new SAS Admin, I would recommend you avoid denying permissions to any groups other than PUBLIC or SASUSERS otherwise you can end up with conflicts that can be hard to understand and troubleshoot.&amp;nbsp; I would thoroughly recommend reading up on best practices for SAS metadata security such as &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Golden-Rules-for-Security-Model-Design/ta-p/373542" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Golden-Rules-for-Security-Model-Design/ta-p/373542&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 03:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Read-only-Permission-to-Redshift-table-via-SAS-DI-studio/m-p/929764#M28551</guid>
      <dc:creator>PaulHomes</dc:creator>
      <dc:date>2024-05-27T03:38:00Z</dc:date>
    </item>
  </channel>
</rss>

