[][src]Enum gcp_auth::GCPAuthError

pub enum GCPAuthError {
    NoAuthMethod(Box<GCPAuthError>, Box<GCPAuthError>),
    TLSError(TLSError),
    OAuthConnectionError(Error),
    OAuthParsingError(Error),
    AplicationProfileMissing,
    AplicationProfilePath(Error),
    AplicationProfileFormat(Error),
    UserProfilePath(Error),
    UserProfileFormat(Error),
    MetadataConnectionError(Error),
    MetadataParsingError(Error),
    MetadataServerUnavailable,
    SignerSchemeError,
    SignerInit,
    IOError(Error),
}

Enumerates all possible errors returned by this library.

Variants

NoAuthMethod(Box<GCPAuthError>, Box<GCPAuthError>)

No available authentication method was discovered

Application can authenticate against GCP using:

  • Defaul service account - available inside GCP platform using GCP Instance Metadata server
  • Service account file - provided using GOOGLE_APPLICATION_CREDENTIALS with path

All authentication methods have been tested and none succeeded. Service account file can be donwloaded from GCP in json format.

TLSError(TLSError)

Error in underlaying RustTLS library. Might signal problem with establishin secure connection using trusted certificates

OAuthConnectionError(Error)

Error when establishing connection to OAuth server

OAuthParsingError(Error)

Error when parsin response from OAuth server

AplicationProfileMissing

Variable GOOGLE_APPLICATION_CREDENTIALS could not be found in the current environment

GOOGLE_APPLICATION_CREDENTIALS is used for providing path to json file with applications credentials. File can be donwoloaded in GCP Console when creating service account.

AplicationProfilePath(Error)

Wrong path to custom application profile credentials provided

Path has to be defined using GOOGLE_APPLICATION_CREDENTIALS environment variable

AplicationProfileFormat(Error)

Wrong format of custom application profile

Application profile is downloaded from GCP console and is stored in filesystem on the server. Full path is passed to library by seeting GOOGLE_APPLICATION_CREDENTIALS variable with path as a value.

UserProfilePath(Error)

Default user profile not found

User can authenticate locally during development using gcloud auth login which results in creating ~/.config/gcloud/application_default_credentials.json which couldn't be find on the machine

UserProfileFormat(Error)

Wrong format of user profile

MetadataConnectionError(Error)

Could not connect to metadata server

Metadata server is available only on GCP services

MetadataParsingError(Error)

Could not parse response from metadata server

MetadataServerUnavailable

Could not connect to metadata server

SignerSchemeError

Could not determine signer scheme

SignerInit

Could not initalize signer

IOError(Error)

Represents all other cases of std::io::Error.

Trait Implementations

impl Debug for GCPAuthError[src]

impl Display for GCPAuthError[src]

impl Error for GCPAuthError[src]

impl From<Error> for GCPAuthError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.