sassoftware / vscode-sas-extension

This SAS Extension for Visual Studio Code provides support for the SAS language, including features such as SAS syntax highlighting, code completion, hover help, code folding, outline, SAS code snippets and run SAS code.
https://sassoftware.github.io/vscode-sas-extension/
Apache License 2.0
117 stars 47 forks source link

SSO Authentication for SAS Viya Connection with Keycloak #1198

Open nrineausanofi opened 2 weeks ago

nrineausanofi commented 2 weeks ago

Describe the feature request We would like to have Single Sign-On (SSO) authentication support when connecting to SAS Viya using the SAS extension in VSCode. Currently, even though the user is already authenticated via Keycloak, the SAS extension does not handle the existing SSO session properly, resulting in several steps and clicks required to retrieve and manually input a token each time the pod is relaunched.

Steps to reproduce the behavior:

The user logs into the eWise application using Keycloak for SSO authentication. After successful authentication, the user opens VSCode by triggering Kubeflow, which validates the Keycloak session. Kubeflow launches a Kubernetes pod running code-server (VSCode) with a default user image. Once VSCode is launched, the user attempts to connect to SAS Viya using the SAS extension. Despite having an existing Keycloak SSO session, the user is required to manually copy and paste the token every time the pod is relaunched. Since the SAS token is stored in the pod, this process needs to be repeated each time, adding unnecessary complexity. Expected behavior The SAS extension in VSCode should automatically recognize the active SSO session authenticated via Keycloak when connecting to SAS Viya. It should authenticate seamlessly without requiring the user to re-enter credentials or manually copy and paste the token.

Environment (please complete the following information):

code-server version: 1.5.3 Kubeflow version: 0.10 EKS version: 1.29 Extension version: v1.5.0-sanofi SAS version: Long-Term Support 2024.03 Keycloak version: 24.05 Additional context

The authentication chain is as follows: The user authenticates with Keycloak in the eWise application → Opens VSCode through Kubeflow → Kubeflow validates the Keycloak session and launches a code-server pod → The user attempts to connect to SAS Viya through the SAS extension. Both eWise and SAS Viya are configured to use the same Keycloak realm for authentication.