pub trait ServiceAccount: Binding {
// Required methods
fn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceAccountInfo, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn impersonate<'life0, 'async_trait>(
&'life0 self,
request: ImpersonationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientConfig, AlienError<ErrorData>>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn as_any(&self) -> &(dyn Any + 'static);
}Expand description
A service account binding that provides identity and impersonation capabilities.
Required Methods§
Sourcefn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceAccountInfo, AlienError<ErrorData>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceAccountInfo, AlienError<ErrorData>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Gets information about the service account
Sourcefn impersonate<'life0, 'async_trait>(
&'life0 self,
request: ImpersonationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientConfig, AlienError<ErrorData>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn impersonate<'life0, 'async_trait>(
&'life0 self,
request: ImpersonationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientConfig, AlienError<ErrorData>>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Impersonates the service account and returns credentials as a ClientConfig.
This performs the cloud-specific impersonation:
- AWS: STS AssumeRole to get temporary credentials
- GCP: IAM Credentials API generateAccessToken
- Azure: Uses the attached managed identity (no API call needed)