Class: Anthropic::Models::Beta::Organization::Federation::BetaFederationRule
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::Federation::BetaFederationRule
- Defined in:
- lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb,
sig/anthropic/models/beta/organization/federation/beta_federation_rule.rbs
Overview
Instance Attribute Summary collapse
-
#applies_to_all_workspaces ⇒ Boolean
When true, this rule is enabled for every workspace in the org (including ones created after the rule).
-
#archived_at ⇒ Time?
If set, this rule is archived and rejects token exchange.
-
#archived_by_actor_id ⇒ String?
Tagged ID (
user_/svac_) of the actor that archived this rule. -
#attributes ⇒ Hash{Symbol=>String}?
CEL expressions extracting named values from claims.
-
#created_at ⇒ Time
When this rule was created.
-
#created_by_actor_id ⇒ String?
Tagged ID (
user_/svac_) of the actor that created this rule. -
#description ⇒ String?
Optional free-text description.
-
#id ⇒ String
Tagged ID of the federation rule.
-
#issuer_id ⇒ String
Tagged ID of the issuer whose tokens this rule accepts.
-
#issuer_name ⇒ String?
Issuer's display name at read time.
-
#match ⇒ Anthropic::Models::Beta::Organization::Federation::BetaFederationRuleMatch
Conditions the verified JWT must satisfy for this rule to apply.
-
#name ⇒ String
Admin-chosen slug identifier.
-
#oauth_scope ⇒ String
Space-separated OAuth scopes granted on the minted token.
-
#target ⇒ Anthropic::Models::Beta::Organization::Federation::BetaServiceAccountTarget
What this rule targets.
-
#token_lifetime_seconds ⇒ Integer
Lifetime in seconds of access tokens minted via this rule.
- #type ⇒ Symbol, :federation_rule
-
#updated_at ⇒ Time
When this rule was last updated.
-
#updated_by_actor_id ⇒ String?
Tagged ID (
user_/svac_) of the actor that last updated this rule. -
#workspace_id ⇒ String?
Legacy single-workspace binding.
-
#workspace_ids ⇒ Array<String>
Tagged IDs of the workspaces this rule is enabled for.
Instance Method Summary collapse
-
#initialize(id:, applies_to_all_workspaces:, archived_at:, archived_by_actor_id:, attributes:, created_at:, created_by_actor_id:, description:, issuer_id:, issuer_name:, match:, name:, oauth_scope:, target:, token_lifetime_seconds:, updated_at:, updated_by_actor_id:, workspace_id:, workspace_ids:, type: :federation_rule) ⇒ BetaFederationRule
constructor
Authorization rule binding an external OIDC identity to Anthropic.
- #to_hash ⇒ { id: String, applies_to_all_workspaces: bool, archived_at: Time?, archived_by_actor_id: String?, attributes: ::Hash[Symbol, String]?, created_at: Time, created_by_actor_id: String?, description: String?, issuer_id: String, issuer_name: String?, match: Anthropic::Beta::Organization::Federation::BetaFederationRuleMatch, name: String, oauth_scope: String, target: Anthropic::Beta::Organization::Federation::BetaServiceAccountTarget, token_lifetime_seconds: Integer, type: :federation_rule, updated_at: Time, updated_by_actor_id: String?, workspace_id: String?, workspace_ids: ::Array[String] }
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, applies_to_all_workspaces:, archived_at:, archived_by_actor_id:, attributes:, created_at:, created_by_actor_id:, description:, issuer_id:, issuer_name:, match:, name:, oauth_scope:, target:, token_lifetime_seconds:, updated_at:, updated_by_actor_id:, workspace_id:, workspace_ids:, type: :federation_rule) ⇒ BetaFederationRule
Authorization rule binding an external OIDC identity to Anthropic.
Evaluates the match conditions and mints an OAuth access token for the resolved
target, scoped to a single workspace where the rule is enabled (chosen by the
caller at exchange time when the rule is enabled for more than one). For rules
enabled via workspace_ids or applies_to_all_workspaces, the target service
account must be a member of that workspace (it is implicitly a member of the
default workspace); rules carrying only the legacy workspace_id binding do not
enforce this.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Federation::BetaFederationRule for more details.
|
|
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 139
|
Instance Attribute Details
#applies_to_all_workspaces ⇒ Boolean
When true, this rule is enabled for every workspace in the org (including ones
created after the rule). workspace_ids is ignored at exchange time.
21 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 21 required :applies_to_all_workspaces, Anthropic::Internal::Type::Boolean |
#archived_at ⇒ Time?
If set, this rule is archived and rejects token exchange.
27 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 27 required :archived_at, Time, nil?: true |
#archived_by_actor_id ⇒ String?
Tagged ID (user_/svac_) of the actor that archived this rule.
33 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 33 required :archived_by_actor_id, String, nil?: true |
#attributes ⇒ Hash{Symbol=>String}?
CEL expressions extracting named values from claims. Not yet supported; always null.
40 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 40 required :attributes, Anthropic::Internal::Type::HashOf[String], nil?: true |
#created_at ⇒ Time
When this rule was created.
46 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 46 required :created_at, Time |
#created_by_actor_id ⇒ String?
Tagged ID (user_/svac_) of the actor that created this rule.
52 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 52 required :created_by_actor_id, String, nil?: true |
#description ⇒ String?
Optional free-text description.
58 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 58 required :description, String, nil?: true |
#id ⇒ String
Tagged ID of the federation rule.
14 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 14 required :id, String |
#issuer_id ⇒ String
Tagged ID of the issuer whose tokens this rule accepts.
64 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 64 required :issuer_id, String |
#issuer_name ⇒ String?
Issuer's display name at read time.
70 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 70 required :issuer_name, String, nil?: true |
#match ⇒ Anthropic::Models::Beta::Organization::Federation::BetaFederationRuleMatch
Conditions the verified JWT must satisfy for this rule to apply. All populated matcher fields must pass.
77 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 77 required :match, -> { Anthropic::Beta::Organization::Federation::BetaFederationRuleMatch } |
#name ⇒ String
Admin-chosen slug identifier.
83 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 83 required :name, String |
#oauth_scope ⇒ String
Space-separated OAuth scopes granted on the minted token.
89 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 89 required :oauth_scope, String |
#target ⇒ Anthropic::Models::Beta::Organization::Federation::BetaServiceAccountTarget
What this rule targets. Check type before reading the other fields. Tokens
minted via a rule whose target type is service_account act as that service
account.
97 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 97 required :target, -> { Anthropic::Beta::Organization::Federation::BetaServiceAccountTarget } |
#token_lifetime_seconds ⇒ Integer
Lifetime in seconds of access tokens minted via this rule. Minted tokens are
capped at max(60, min(this value, 2 × remaining assertion validity)) seconds.
104 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 104 required :token_lifetime_seconds, Integer |
#type ⇒ Symbol, :federation_rule
109 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 109 required :type, const: :federation_rule |
#updated_at ⇒ Time
When this rule was last updated.
115 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 115 required :updated_at, Time |
#updated_by_actor_id ⇒ String?
Tagged ID (user_/svac_) of the actor that last updated this rule.
121 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 121 required :updated_by_actor_id, String, nil?: true |
#workspace_id ⇒ String?
Legacy single-workspace binding. Prefer workspace_ids and the
/federation_rules/{federation_rule_id}/workspaces sub-resource for managing
workspace enablement.
129 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 129 required :workspace_id, String, nil?: true |
#workspace_ids ⇒ Array<String>
Tagged IDs of the workspaces this rule is enabled for. May be empty for older
rules that only carry the legacy workspace_id binding. Ignored at exchange
time when applies_to_all_workspaces is true (the list may still be non-empty).
137 |
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 137 required :workspace_ids, Anthropic::Internal::Type::ArrayOf[String] |
Instance Method Details
#to_hash ⇒ { id: String, applies_to_all_workspaces: bool, archived_at: Time?, archived_by_actor_id: String?, attributes: ::Hash[Symbol, String]?, created_at: Time, created_by_actor_id: String?, description: String?, issuer_id: String, issuer_name: String?, match: Anthropic::Beta::Organization::Federation::BetaFederationRuleMatch, name: String, oauth_scope: String, target: Anthropic::Beta::Organization::Federation::BetaServiceAccountTarget, token_lifetime_seconds: Integer, type: :federation_rule, updated_at: Time, updated_by_actor_id: String?, workspace_id: String?, workspace_ids: ::Array[String] }
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'sig/anthropic/models/beta/organization/federation/beta_federation_rule.rbs', line 94
def to_hash: -> {
id: String,
applies_to_all_workspaces: bool,
archived_at: Time?,
archived_by_actor_id: String?,
attributes: ::Hash[Symbol, String]?,
created_at: Time,
created_by_actor_id: String?,
description: String?,
issuer_id: String,
issuer_name: String?,
match: Anthropic::Beta::Organization::Federation::BetaFederationRuleMatch,
name: String,
oauth_scope: String,
target: Anthropic::Beta::Organization::Federation::BetaServiceAccountTarget,
token_lifetime_seconds: Integer,
type: :federation_rule,
updated_at: Time,
updated_by_actor_id: String?,
workspace_id: String?,
workspace_ids: ::Array[String]
}
|