Skip to content

Suggest OAuth Store path as ENV variable #497

Description

@dhakehurst

Each of the refimpl services contains its own 'AuthenticationApplication' class with a hard coded relative path to the oslcOAuthStore.xml file.

to improve the ability to map this file to a docker volume, enabling one to more easily set provisional to false for entries in the file.
I suggest you make it configurable with an environment variable.

e.g.

    private AuthenticationApplication() {
        // Start of user code constructor_init
        // End of user code
        var AUTH_VAR = "OAUTH_STORE_FILE";
        final Map<String, String> env = System.getenv();
        oslcConsumerStoreFilename= "./oslcOAuthStore.xml";
        if (env.containsKey(AUTH_VAR)) {
            oslcConsumerStoreFilename = env.get(AUTH_VAR);
            log.debug("ENV variable '{}' found", AUTH_VAR);
        } else {
            log.debug("ENV variable '{}' not defined", AUTH_VAR);
        }
        oauth1TokenToApplicationConnector = new LRUCache<String, String>(2000);
        // Start of user code constructor_finalize
        // End of user code
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions