Categorygithub.com/sassoftware/sas-viya-authorization-model
modulepackage
2.5.0+incompatible
Repository: https://github.com/sassoftware/sas-viya-authorization-model.git
Documentation: pkg.go.dev

# README

SAS Viya Authorization Model

Apache License 2.0

Intent

Defining, applying, and documenting repeatable, standardized authorization patterns for SAS Viya.

Prerequisites

This tool has been developed subject to the following prerequisites:

  • SAS Viya 2020.1 or later
  • Either:
    • sas-viya CLI installed and one or more profiles initialized (i.e. sas-viya profile init), OR
    • Environment Variables GVA_USER, GVA_PW, and GVA_BASEURL set
  • (Service) account with permissions to create and modify SAS Viya & CAS objects (folders, files, global scope CASLIBs, etc.) and configure corresponding authorization (i.e. a member of the SASAdministrators superuser group)

Note: All functionality can be run from a host that is not part of the SAS Viya environment but has HTTP(S) network connectivity to it. If using HTTPS, the TLS certificate chain (including the Root CA) need to be valid for the client.

Configuration

Precedence order

Configuration properties are evaluated in the following order of precedence:

  • CLI Flags
  • Environment Variables
  • Configuration File
  • Defaults

CLI Flags

To explore the available commands and flags, call the goviyaauth help command.

Environment Variables

The following environment variables are available for configuration:

VariableDefaultDescription
GVA_CLIDIR/opt/sas/viya/home/bin/Path to the SAS Viya admin-cli directory
GVA_CASSERVERcas-shared-defaultCAS server to apply DAP
GVA_LOGFILEgva-YYYY-MM-DD.logPath to and name of log file
GVA_LOGLEVELINFOLogging level
GVA_RESPONSELIMIT1000Limit of REST items returned
GVA_BASEURLn/aSAS environment base URL (e.g. sas-endpoint in ~/.sas/config.json)
GVA_VALIDTLStrueValidate the TLS connection is secure
GVA_PROFILEDefaultProfile to use from ~/.sas/config.json
GVA_USERn/aSAS Administrator account username
GVA_PWn/aSAS Administrator account password
GVA_CLIENTIDsas.cliOAuth 2.0 Client ID registered with SAS Logon Manager
GVA_CLIENTSECRETn/aOAuth 2.0 Client Secret registered with SAS Logon Manager

Configuration File

A configuration file can be placed at $HOME/.sas/gva.json to define the following properties:

VariableDefaultDescription
clidir/opt/sas/viya/home/bin/Path to the SAS Viya admin-cli directory
casservercas-shared-defaultCAS server to apply DAP
logfilegva-YYYY-MM-DD.logPath to and name of log file
loglevelINFOLogging level
responselimit1000Limit of REST items returned
baseurln/aSAS environment base URL (e.g. sas-endpoint in ~/.sas/config.json)
validtlstrueValidate the TLS connection is secure

Authorization Patterns

Permissions are granted to SAS Viya custom groups of which Identity Provider (either LDAP or SCIM) groups and/or users are nested members. This approach retains the authorization model in case of intermittent issues with synchronization. The following figure depicts the nested relationship between example groups which maximises inheritance of authorization permissions in accordance with general security principles:

Nested Group Example

Permission assignments to authorization groups include:

  • Platform Capabilities (Viya authorization rules & CAS role),
  • Information Products (Viya authorization rules),
  • Data Access (CAS access controls).

The defined authorization patterns form the main handover between designing and deploying a SAS Viya Authorization Model. Refer to the samples for guidance on the required pattern format to apply these.

Information Products

The following figure depicts an example Information Product Access Pattern ("IPAP") to secure Information Products:

Information Product Access Pattern

Object-level permissions apply to content folders, while conveyed permissions apply to nested objects (e.g. reports, code, etc.) within content folders. While it is possible to apply individual authorization rules to nested objects, it is good practice to inherit permissions from content folders instead.

The following table describes the SAS Viya authorization permissions used throughout the IPAP pattern definitions. The first column corresponds to the acceptable permissions values defined for authorization rules.

PermissionDescription
readRead an object
updateUpdate or edit an object
deleteDelete an object
createCreate a new object
secureSet permissions on an object(manipulate the object’s direct rules)
addPut an object into a container
removeMove an object out of a container

Data Access

The following figure depicts an example Data Access Pattern ("DAP") to secure data:

Data Access Pattern

CASLIB-level permissions apply to the overall CASLIB, while table-level permissions apply to nested tables within CASLIBs. While it is possible to apply individual authorization rules to nested tables, columns, rows, actions, and action sets, it is good practice to inherit permissions from CASLIBs instead.

The following table describes the SAS CAS access controls used throughout the DAP pattern definitions.

PermissionDescription
ReadInfoView and traverse objects
SelectRead data values
LimitedPromotePromote from source in the same CASLIB
PromotePromote from any CASLIB
CreateTableSave (persist) a table
DropTableRemove a table from global scope
DeleteSourceDelete a physical source table
InsertAdd rows
UpdateChange data values
DeleteDelete rows
AlterTableChange the attributes or structure of a table
AlterCASLIBChange the properties of a CASLIB
ManageAccessSet access controls

Contributing

We welcome your contributions! Please read CONTRIBUTING.md for details on how to submit contributions to this project.

License

This project is licensed under the Apache 2.0 License.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author