Class: Katalyst::GoogleApis::Credentials::Config
- Inherits:
-
Object
- Object
- Katalyst::GoogleApis::Credentials::Config
- Includes:
- ActiveModel::Attributes, ActiveModel::Model
- Defined in:
- app/services/katalyst/google_apis/credentials.rb
Instance Method Summary collapse
- #audience ⇒ Object
- #regional_cred_verification_url ⇒ Object
- #service_account_impersonation_url ⇒ Object
- #subject_token_type ⇒ Object
- #to_h ⇒ Object
- #token_url ⇒ Object
- #type ⇒ Object
- #universe_domain ⇒ Object
Instance Method Details
#audience ⇒ Object
53 54 55 56 57 58 59 60 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 53 def audience ["//iam.googleapis.com", *{ projects: project_number, locations: "global", workloadIdentityPools: identity_pool, providers: identity_provider, }].join("/") end |
#regional_cred_verification_url ⇒ Object
69 70 71 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 69 def regional_cred_verification_url "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" end |
#service_account_impersonation_url ⇒ Object
62 63 64 65 66 67 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 62 def service_account_impersonation_url ["https://iamcredentials.googleapis.com/v1", *{ projects: "-", serviceAccounts: "#{service_account_email}:generateAccessToken", }].join("/") end |
#subject_token_type ⇒ Object
73 74 75 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 73 def subject_token_type "urn:ietf:params:aws:token-type:aws4_request" end |
#to_h ⇒ Object
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 89 def to_h { scope:, universe_domain:, type:, audience:, subject_token_type:, token_url:, service_account_impersonation_url:, service_account_impersonation: { token_lifetime_seconds: }, credential_source: { regional_cred_verification_url: }, } end |
#token_url ⇒ Object
77 78 79 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 77 def token_url "https://sts.googleapis.com/v1/token" end |
#type ⇒ Object
85 86 87 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 85 def type "external_account" end |
#universe_domain ⇒ Object
81 82 83 |
# File 'app/services/katalyst/google_apis/credentials.rb', line 81 def universe_domain "googleapis.com" end |