AUTHLIB Procedure

Example 18: Resetting Credentials on Imported SecuredLibrary Objects

Features:
PROC AUTHLIB statement options:
MODIFY statement options:
LIBRARY=
PW=
ENCRYPT=
ENCRYPTKEY=

Details

This example shows how to reset the passwords and encryption key on SecuredLibrary objects that are imported from a backup package.
  • The LIBNAME statement without the AUTHADMIN=YES option fails because there are no associated password values restored by the import.
  • The AUTHADMIN=YES option is used to enable the AUTHLIB procedure to execute with the binding information in the physical library.
  • The MODIFY statement is used to reset the metadata-bound library passwords and encryption key value on the library from Binding a Library with Required AES Encryption When Existing Data Sets Are Encrypted with the Same Encryption Key assuming that the SecuredLibrary object was imported from a backup package without those values.

Program

libname abcde "sas-library" ;
libname abcde "sas-library" authadmin=yes;
proc authlib lib=abcde;
    modify  
        pw=secret 
        encrypt=aes 
        encryptkey=value;
run;
quit;
libname abcde "sas-library";

Program Description

Library ABCDE has three data sets: Employees, EmpInfo, and DeptName. This LIBNAME statement fails because there are no associated password values.
libname abcde "sas-library" ;
Use the AUTHADMIN=YES option.The AUTHADMIN=YES option enables the AUTHLIB procedure to execute with the binding information in the physical library.
libname abcde "sas-library" authadmin=yes;
Use the MODIFY statement to reset the metadata-bound library passwords and encryption key value.The PW= option resets the password. The ENCRYPTKEY= option resets the encryption key value.
proc authlib lib=abcde;
    modify  
        pw=secret 
        encrypt=aes 
        encryptkey=value;
run;
quit;
Reissue the LIBNAME statement without the AUTHADMIN=YES option. It is good practice to reassign the library without AUTHADMIN=YES as soon as your administrative need is complete, so that any other access that you make to the library is not in administrative mode. In this case, it also ensures that the credentials are reset.
libname abcde "sas-library";
Resetting Credentials
253 libname abcde "library-name" ;
ERROR: The secured library object information for library ABCDE could not be obtained 
       from the metadata server or has invalid data.
ERROR: Association not found.
ERROR: Error in the LIBNAME statement.
254  libname abcde "library-name" authadmin=yes;
NOTE: Libref ABCDE was successfully assigned as follows:
      Engine:             V9
      Physical Name:      library-name
      Secured Library:    /System/Secured Libraries/Department XYZZY/ABCDEEmps
      Authenticated ID:   user-id@site as user-id
      Encryption Key:     YES
      Require Encryption: YES
255  proc authlib lib=abcde;
256  modify
257        pw=XXXXXX
258        encrypt=aes
259        encryptkey=XXX ;
260  run;

NOTE: Required encryption will use AES encryption with the recorded key.


NOTE: The passwords on ABCDE.DEPTNAME.DATA do not require modification.
NOTE: The passwords on ABCDE.EMPINFO.DATA do not require modification.
NOTE: The passwords on ABCDE.EMPLOYEE.DATA do not require modification.
261  quit;