BookmarkSubscribeRSS Feed

Increased Security Using Git Starting in SAS® Studio Stable 2024.06

Started ‎08-01-2024 by
Modified ‎08-01-2024 by
Views 471

Beginning in stable 2024.06, a SAS Administrator can define a domain to be associated with a security credential in SAS® Environment Manager when using HTTPS authentication or SSH authentication with password-protected SSH keys. This allows you to manage your credentials outside of your regular SAS Studio preferences, and manage multiple sets of credentials for different connections.

 

Once the domain is defined, the end user can define their credentials for the domain in SAS Environment Manager. The end user can then point to that domain when they define their local repository instead of specifying their password or personal access token (PAT). Note that your information is not exposed in SAS Studio when defining your PAT or password. 

 

Note: The steps below assume that a remote Git repository has already been defined and that you have basic familiarity with Git technology and your hosting service.

Using HTTPS Authentication with Git

SAS Administrator steps

The SAS Administrator should complete the following steps:

  1. From SAS Environment Manager, click Domains. Then, click the New icon.
LeliaM_0-1722521879019.png

 

  1. In the New Domain form, enter any value for the ID that is not already in use. Keep the type as Authentication (password) and specify the Identities’ user name.
LeliaM_1-1722521879025.png

 

  1. Once the SAS Administrator enters a valid value for the Identities, the User ID, Password, and Confirm Password fields are displayed. The SAS administrator can enter a bogus/fake personal access token as a placeholder. The end user will override this for themselves later.
LeliaM_2-1722521879029.png

 

Note: The end user can change the password to their actual personal access token when they enter their credentials.

  1. Navigate to ConfigurationAll services ► select SAS Studio.
  2. For sas.studio, click Edit (the Pencil icon).
  3. Enable allowGit and allowGitPassword (if they are not enabled already).
LeliaM_3-1722521879033.png

 

  1. Click Save
  2. Sign out of SAS Environment Manager.

End User steps

The end user should complete the following steps:

  1. From SAS Environment Manager ► click My Credentials ► select the domain that was created ►click Edit (the Pencil icon). In the example below, the domain is git_domain
LeliaM_4-1722521879036.png

 

  1. Enter the user ID and password associated with the remote Git repository.
LeliaM_5-1722521879039.png

 

  1. Click Save.
  2. Sign out of SAS Environment Manager.
  3. Sign on to SAS Studio.
  4. Navigate to OptionsManage Git Connections ► click Profiles ► click the + icon.
LeliaM_6-1722521879040.png

 

      The Add a Profile window is displayed. 

  1. Click the HTTPS tab at the top of the profile window. If the SSH and HTTPS tabs are not displayed, see step six under the SAS Administrator section above.
  2. Enter a profile name, your name, and email address.
  3. For the Credentials method: field, select the Use authentication (password) domain option from the drop-down list.
LeliaM_7-1722521879041.png

 

 

  1. Select the domain for SAS Studio to use when cloning the repository. This domain should have the same name that you used above.
LeliaM_8-1722521879043.png

 

Note: Beginning in Stable 2024.08, the Domain name field was renamed to Domain ID.

  1. Click Git RepositoriesRepositories ► click the + icon ► select the Clone a repository option from the drop-down list.
LeliaM_9-1722521879044.png

 

  1. Enter a remote repository HTTPS address, an empty folder on the file system, and the git_domain profile that you created earlier.
  2. Click Clone
LeliaM_10-1722521879045.png

 

  1. Click Close from Manage Git Connections.
  2. Click the Git icon to view the new repository that you defined in the list of repositories.

 

LeliaM_11-1722521879046.png

 

 

SSH Authentication When SSH Keys are Passphrase-Protected

SAS recommends that you use ED25519 SSH keys if they are supported by your remote repository. You can generate the SSH keys by using the PuTTYgen key generator or Git Bash with the following command:

 

ssh-keygen -t ed25519 -C "your_email@example.com"

 

SAS Administrator steps

The SAS Administrator should complete the following steps:

  1. From SAS Environment Manager, select Domains ► the New icon.
LeliaM_12-1722521879050.png

 

  1. In the New Domain form, enter any value for the ID that is not already in use. Keep the type as Authentication (password) and specify the Identities’ user name.
LeliaM_13-1722521879051.jpeg

 

  1. Once the SAS Administrator enters a valid value for the Identities, the User ID, Password, and Confirm Password fields are displayed. The SAS administrator can enter a temporary password since the end user can change the temporary password to the real password when they enter their credentials.

 

LeliaM_14-1722521879053.jpeg

 

  1. Navigate to SAS Environment ManagerConfigurationAll services.
  2. Search for SAS Studio.
LeliaM_15-1722521879058.jpeg

 

  1. Within the SAS Studio service ► sas.studio, click Edit (the Pencil icon).
  2. Enable allowGitSSHPassword.
  3. Click Save.
  4. Sign out of SAS Studio.

End User steps

The end user should complete the following steps:

  1. From SAS Environment Manager, ► select My Credentials ► the domain that was created ►click Edit (the Pencil icon). In this example, the domain is ssh_domain.
  2. Enter the passphrase associated with the remote repository.
LeliaM_16-1722521879059.jpeg

 

 

  1. Open SAS Studio. Then, navigate to OptionsManage Git Connections ► select Profiles ► click the + icon.
LeliaM_17-1722521879060.jpeg

 

The Add a Profile window is displayed.

  1. Click SSH at the top of the profile window. 
  2. Enter a profile name, your name and email address, and a location to the public and private SSH Keys.
  3. Select the Use a password-protected SSH key check box.
  4. For the Credential method field, select the Use authentication (password domain) option.
LeliaM_18-1722521879062.png

 

  1. Select the domain for SAS Studio to use when cloning the repository. 
LeliaM_19-1722521879064.png

 

Note: Beginning in 2024.08, the Domain name field was renamed to Domain ID.

  1. Clone the Git repository from Manage Git ConnectionsClone a repository.
LeliaM_20-1722521879065.jpeg

 

  1. Click Clone.

After a short refresh, the repository should be displayed.

  1. Click Close from the Manage Git Connections window.

 

By completing these steps, you can define a secure HTTPS or SSH Profile to work with your repositories without exposing your PAT or passphrase in SAS Studio.

Version history
Last update:
‎08-01-2024 01:38 PM
Updated by:

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Free course: Data Literacy Essentials

Data Literacy is for all, even absolute beginners. Jump on board with this free e-learning  and boost your career prospects.

Get Started

Article Tags