Skip to content

Add TokenSourceFactory to get the appropriate authentication mechanism

Erik Dahl requested to merge slb-master-edahl2-Add-TokenSourceFactory into slb-master

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [Yes]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description?

After we started checking the existence of the AUTHENTICATION_PLUGIN_FILE environment variable, we need a wrapper method to pick the appropriate authentication method. The current implementation is to use BASIC authentication (i.e. pass the JWT token and use it for as long as it is valid) if the AUTHENTICATION_PLUGIN_FILE variable is not set. Otherwise use the authentication from plugin method implemented in the DLL pointed to by the environment variable.

Call segysdk::utilities::TokenSourceFactory::getTokenSource(std::string fileName)

to get the appropriate authenticator. If fileName is a local file, you will get a localOnly authenticator, if it is a cloud hosted file (sd://) you will get a pointer to a valid authenticator.

Edited by Erik Dahl

Merge request reports

Loading