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

Resolving some Windows environment variables. #242

Open
AFract opened this issue Jul 2, 2024 · 3 comments
Open

Resolving some Windows environment variables. #242

AFract opened this issue Jul 2, 2024 · 3 comments
Labels
enhancement New feature or request status:planned We plan to work on this

Comments

@AFract
Copy link

AFract commented Jul 2, 2024

Hello,

Under Windows, to authenticate to a certain service, I need to send the windows network username. I would like to be able to resolve it as it's returned for example when calling the .Net "Environment.UserName" property (I know Kreya is in .Net so you can easily figure how it's computed).

Is it possible to do this in Kreya with {{ }} syntax ? I didn't find it in documentation if it's already supported, sorry.

Of course I could store it hard-coded in a Kreya environment variable, but it's not convenient for a shared Kreya project between several users.

Thank you

@AFract AFract added the enhancement New feature or request label Jul 2, 2024
@ni507
Copy link
Contributor

ni507 commented Jul 2, 2024

Hello and thank you for your report.

At the moment it is only possible to use environment variables prefixed with KREYA_ENV_ as documented here.

Does this meet your needs?

@AFract
Copy link
Author

AFract commented Jul 2, 2024

For me it does not meet at all my question. Or could you please provide me a working example for Environment.UserName ?

@ni507
Copy link
Contributor

ni507 commented Jul 2, 2024

Okay, at the moment it's not possible to access an environment variable directly (e.g. UserName). You would have to create a new environment variable like KREYA_ENV_UserName and can access it with {{ env.UserName }}.

Since this may not be what you want, I have added it to our backlog that it is possible to access the environment directly with something like {{ system.env.UserName }}.

@ni507 ni507 added the status:planned We plan to work on this label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request status:planned We plan to work on this
Projects
None yet
Development

No branches or pull requests

2 participants