Published on :
Administration CREATION_INTERNE

Creation of Authentication Domains

This code is also available in: Deutsch Español Français
Awaiting validation
Attention : This code requires administrator privileges.
The program first configures connection options to the SAS© metadata server (metaserver, metaport, metauser, metapass, metarepository, metaprotocol). These connection details are crucial for interacting with the SAS© Viya 4 environment. Then, it uses PROC METADATA to submit an XML fragment that defines three new authentication domains: 'AuthDomain1', 'AuthDomain2', and 'AuthDomainn', with associated descriptions. These domains are created in the repository specified by the $METAREPOSITORY variable. This operation is a typical system administration task.
Data Analysis

Type : CREATION_INTERNE


The data for the authentication domains to be created is defined directly as XML within the 'in' option of PROC METADATA. No external data source is used for this operation.

1 Code Block
OPTIONS
Explanation :
This block configures the connection parameters to the SAS metadata server. It specifies the host, port, user credentials ('sasadm @saspw' with 'Password'), the repository ('Foundation'), and the communication protocol ('BRIDGE'). These options are essential for PROC METADATA to authenticate and interact correctly with the target SAS environment.
Copied!
1options
2 metaserver="meta.demo.sas.com"
3 metaport=8561
4 metauser="sasadm @saspw"
5 metapass="Password"
6 metarepository=Foundation
7 metaprotocol=BRIDGE;
2 Code Block
PROC METADATA Data
Explanation :
This block executes PROC METADATA to create authentication domains. The XML content provided via the 'in' option specifies the names ('AuthDomain1', 'AuthDomain2', 'AuthDomainn'), descriptions, and public types of the domains to be added to the SAS metadata repository. The 'Reposid' is dynamically populated by the $METAREPOSITORY system variable, ensuring the domains are created in the correct location. Additional flags and options are related to metadata management.
Copied!
1PROC METADATA
2in='
3<AddMetadata>
4 <Metadata>
5 <AuthenticationDomain Name="AuthDomain1" Desc="Description for AuthDomain1" PublicType="AuthenticationDomain" UsageVersion="1000000"/>
6 <AuthenticationDomain Name="AuthDomain2" Desc="Description for AuthDomain2" PublicType="AuthenticationDomain" UsageVersion="1000000"/>
7 <AuthenticationDomain Name="AuthDomainn" Desc="Description for AuthDomain3" PublicType="AuthenticationDomain" UsageVersion="1000000"/>
8 </Metadata>
9 <Reposid>$METAREPOSITORY</Reposid>
10 <NS>SAS</NS>
11 <Flags>268435456</Flags>
12 <Options/>
13</AddMetadata>
14';
15RUN;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Author: Greg Wootton Date: 02MAY2017