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

API to get default config/ccache/keytab path #499

Open
viacheslavka opened this issue Dec 2, 2022 · 0 comments
Open

API to get default config/ccache/keytab path #499

viacheslavka opened this issue Dec 2, 2022 · 0 comments

Comments

@viacheslavka
Copy link

The MIT krb5 implementation provides a set of defaults for various values, e.g. port numbers, config file paths and so on. Many of these defaults can be overridden with user-provided environment variables, which is a convenient way to avoid telling each program where their keytabs and credentials caches are placed.

While it is possible for applications to check all the necessary environment variables and default values themselves, it would probably be much simpler for everyone if the library provided such functionality out of the box. Even better, the library could provide a way to create a "default" client using nothing but these default values.

To implement this, I suggest adding a pair of functions names GetDefaultPath and LoadDefault (or similar) to each of the following packages: config, keytab, credentials. A default client could be created with a function called NewFromDefaults.

I understand that the code needs to be platform-agnotic, but I believe that environment variables are ubiquitous enough and the new API should not prevent the library from working on platforms where it's hard to find a default path, as it can simply return an error if it encounters any issues or runs on an unsupported platform.

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

No branches or pull requests

1 participant