pub trait ServiceAccount: Binding {
// Required methods
fn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceAccountInfo>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn impersonate<'life0, 'async_trait>(
&'life0 self,
request: ImpersonationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientConfig>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn as_any(&self) -> &dyn Any;
}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>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ServiceAccountInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets information about the service account
Sourcefn impersonate<'life0, 'async_trait>(
&'life0 self,
request: ImpersonationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn impersonate<'life0, 'async_trait>(
&'life0 self,
request: ImpersonationRequest,
) -> Pin<Box<dyn Future<Output = Result<ClientConfig>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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)