BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Andreas_M5
Calcite | Level 5
Hi.
I am looking for help with a seemingly simple task. I am looking to call a Rest API that requires me to have a client side certificate with a correct role to get access to some sensitive information.

I am hoping to be able to use base SAS and prof http requests - but I am having trouble how to provide the certificate.

The cert file is in both p12 and pem format if that makes a difference.

Please, could any of you provide me with some tips or help to get started on this?

Cheers.
1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

PROC HTTP respects the SSL* options that you can specify in your SAS session, which includes options related to certificates.  See the Encryption in SAS documentation.  As of SAS 9.4m6, you can also include these values in a new SSLPARMS statement.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

View solution in original post

4 REPLIES 4
ChrisHemedinger
Community Manager

PROC HTTP respects the SSL* options that you can specify in your SAS session, which includes options related to certificates.  See the Encryption in SAS documentation.  As of SAS 9.4m6, you can also include these values in a new SSLPARMS statement.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
bugraduman1
Calcite | Level 5

Hi Chris

sorry for pinging and old post but I ma having the same difficulty and yes I have tried both setting ssl options for environment var by putting in front of my script or using sslparms yet  cannot get positive response from our internal API. in order to test if the SAS code works I have created session from programming runtime machine and execute same code , it works flawlessly. Does any service overrides these sslparms value while executing it from sas studio ? we are using viya 3.5

ChrisHemedinger
Community Manager

Hi @bugraduman1,

 

Are you saying the SAS code works from another environment (like Local SAS) but not from within SAS Studio in Viya? It does sound like a cert/trust issue, or maybe firewall/network. I recommend first gathering more information by using the DEBUG LEVEL=3 statement in PROC HTTP, and making sure that other PROC HTTP calls can work from your SAS Viya environment. If these diagnostics don't yield anything, then I recommend working with SAS Technical Support -- they can direct some more tests/steps. 

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
bugraduman1
Calcite | Level 5

Hi Chris,

thanks for your answer we have opened ticket for support.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 3435 views
  • 0 likes
  • 3 in conversation