BookmarkSubscribeRSS Feed
SASBob
Fluorite | Level 6

Is it possible to control who can access the SAS Stored Process web application independently of other stored process access rights?  Ultimately I'd like to create a group of users who can access the stored process web application and not allow any other users.  This would be completely indepdendent of the SAS folder access, so some users may have access to execute a stored process in MS Excel through the add-in, but have no access to open the SAS Stored Process web application at all. 

2 REPLIES 2
AllanBowe
Barite | Level 11

Authorisation in SAS is set against metadata objects (eg folders, STPs) and authentication via SASLogon.  I am not aware of an 'out of the box' way for SASLogon to determine client context (eg via SPWA or directly through the MSO Addin) and permit access on that basis.

 

However, it would be possible to inject some code at the beginning of each stp invocation to perform a kind of 'conditional abort'.

 

The place to set your 'initialisation' code is described here:  https://support.sas.com/kb/39/250.html

 

You'll want to test for the existence of some automatic SPWA variable, such as `_HTCOOK` or those 'used by' 'web clients' as described here:  http://support.sas.com/rnd/itech/doc9/dev_guide/stprocess/reserved.html

 

Here is a macro to help you get the list of groups for a particular user:  https://github.com/sasjs/core/blob/main/meta/mm_getgroups.sas

 

To 'abort gracefully' from an STP you need the following:

 

    data _null_;
      rc = stpsrvset('program error', 0);
    run;
    endsas;

 

Bit of a workaround though.. Be interesting to learn if there are other solutions (short of disabling the SPWA).

/Allan
MacroCore library for app developers
Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs
SASBob
Fluorite | Level 6

Thanks, I'll take a look and let you know how it goes.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1322 views
  • 1 like
  • 2 in conversation