Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SAP authentication to DuckDB Secret manager #35

Open
jrosskopf opened this issue Jun 7, 2024 · 3 comments
Open

Change SAP authentication to DuckDB Secret manager #35

jrosskopf opened this issue Jun 7, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jrosskopf
Copy link
Collaborator

The DuckDB secrets manager provides a unified user interface for secrets across all backends that use them. Secrets can be scoped, so different storage prefixes can have different secrets, allowing for example to join data across organizations in a single query. Secrets can also be persisted, so that they do not need to be specified every time DuckDB is launched.

We want to use the secrets manager available since v0.9.2 to resplace the SET commands. Meaning instead of

# Setup connection parameters
SET sap_ashost = '[HOST IP ADRESS]';
SET sap_sysnr = '00';
SET sap_user = '[USERNAME]';
SET sap_password = '[PASSWORD]';
SET sap_client = '001';
SET sap_lang = 'EN';

One can do then

CREATE SECRET (
	TYPE SAP_RFC,
	ASHOST '${HOST_IP_ADDRESS}',
	SYSNR '00',
        CLIENT '001',
	USER '${USERNAME}',
        PASSWORD '${PASSWORD}',
        LANG 'EN'
)
@jrosskopf jrosskopf added the enhancement New feature or request label Jun 7, 2024
@jrosskopf jrosskopf self-assigned this Jun 7, 2024
@gregorwolf
Copy link

Will this also fix the issue that right now I get the error:

D PRAGMA sap_rfc_ping;
IO Error: Error during SAP RFC logon: RFC_LOGON_FAILURE: Name or password is incorrect (repeat logon)

when using a password that contains $?

@jrosskopf
Copy link
Collaborator Author

jrosskopf commented Jun 19, 2024 via email

@gregorwolf
Copy link

Right now I've used the SET sap_password = '...' option. To get the value passed correctly I had to excape with \$.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants