Class: Anthropic::Models::Beta::Organization::Federation::BetaFederationRule

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb,
sig/anthropic/models/beta/organization/federation/beta_federation_rule.rbs

Overview

See Also:

  • Anthropic::Resources::Beta::Organization::Federation::Rules#create

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ Object

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.

Parameters:

  • id (String)

    Tagged ID of the federation rule.

  • applies_to_all_workspaces (Boolean)

    When true, this rule is enabled for every workspace in the org (including ones c

  • archived_at (Time, nil)

    If set, this rule is archived and rejects token exchange.

  • archived_by_actor_id (String, nil)

    Tagged ID (user_/svac_) of the actor that archived this rule.

  • attributes (Hash{Symbol=>String}, nil)

    CEL expressions extracting named values from claims. Not yet supported; always n

  • created_at (Time)

    When this rule was created.

  • created_by_actor_id (String, nil)

    Tagged ID (user_/svac_) of the actor that created this rule.

  • description (String, nil)

    Optional free-text description.

  • issuer_id (String)

    Tagged ID of the issuer whose tokens this rule accepts.

  • issuer_name (String, nil)

    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. All populated m

  • 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)

    Identity that tokens minted via this rule act as. Currently always a `service_ac

  • token_lifetime_seconds (Integer)

    Lifetime in seconds of access tokens minted via this rule. Minted tokens are cap

  • updated_at (Time)

    When this rule was last updated.

  • updated_by_actor_id (String, nil)

    Tagged ID (user_/svac_) of the actor that last updated this rule.

  • workspace_id (String, nil)

    Legacy single-workspace binding. Prefer workspace_ids and the `/federation_rul

  • workspace_ids (Array<String>)

    Tagged IDs of the workspaces this rule is enabled for. May be empty for older ru

  • type (Symbol, :federation_rule) (defaults to: :federation_rule)


# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 138

Instance Attribute Details

#applies_to_all_workspacesBoolean

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.

Parameters:

Returns:



21
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 21

required :applies_to_all_workspaces, Anthropic::Internal::Type::Boolean

#archived_atTime?

If set, this rule is archived and rejects token exchange.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


27
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 27

required :archived_at, Time, nil?: true

#archived_by_actor_idString?

Tagged ID (user_/svac_) of the actor that archived this rule.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 33

required :archived_by_actor_id, String, nil?: true

#attributesHash{Symbol=>String}?

CEL expressions extracting named values from claims. Not yet supported; always null.

Parameters:

  • value (::Hash[Symbol, String], nil)

Returns:

  • (Hash{Symbol=>String}, nil)


40
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 40

required :attributes, Anthropic::Internal::Type::HashOf[String], nil?: true

#created_atTime

When this rule was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


46
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 46

required :created_at, Time

#created_by_actor_idString?

Tagged ID (user_/svac_) of the actor that created this rule.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


52
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 52

required :created_by_actor_id, String, nil?: true

#descriptionString?

Optional free-text description.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


58
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 58

required :description, String, nil?: true

#idString

Tagged ID of the federation rule.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 14

required :id, String

#issuer_idString

Tagged ID of the issuer whose tokens this rule accepts.

Parameters:

  • value (String)

Returns:

  • (String)


64
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 64

required :issuer_id, String

#issuer_nameString?

Issuer's display name at read time.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


70
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 70

required :issuer_name, String, nil?: true

#matchAnthropic::Models::Beta::Organization::Federation::BetaFederationRuleMatch

Conditions the verified JWT must satisfy for this rule to apply. All populated matcher fields must pass.

Parameters:

  • value (Anthropic::Beta::Organization::Federation::BetaFederationRuleMatch)

Returns:



77
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 77

required :match, -> { Anthropic::Beta::Organization::Federation::BetaFederationRuleMatch }

#nameString

Admin-chosen slug identifier.

Parameters:

  • value (String)

Returns:

  • (String)


83
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 83

required :name, String

#oauth_scopeString

Space-separated OAuth scopes granted on the minted token.

Parameters:

  • value (String)

Returns:

  • (String)


89
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 89

required :oauth_scope, String

#targetAnthropic::Models::Beta::Organization::Federation::BetaServiceAccountTarget

Identity that tokens minted via this rule act as. Currently always a service_account target.

Parameters:

  • value (Anthropic::Beta::Organization::Federation::BetaServiceAccountTarget)

Returns:



96
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 96

required :target, -> { Anthropic::Beta::Organization::Federation::BetaServiceAccountTarget }

#token_lifetime_secondsInteger

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.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


103
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 103

required :token_lifetime_seconds, Integer

#typeSymbol, :federation_rule

Parameters:

  • value (:federation_rule)

Returns:

  • (Symbol, :federation_rule)


108
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 108

required :type, const: :federation_rule

#updated_atTime

When this rule was last updated.

Parameters:

  • value (Time)

Returns:

  • (Time)


114
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 114

required :updated_at, Time

#updated_by_actor_idString?

Tagged ID (user_/svac_) of the actor that last updated this rule.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


120
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 120

required :updated_by_actor_id, String, nil?: true

#workspace_idString?

Legacy single-workspace binding. Prefer workspace_ids and the /federation_rules/{federation_rule_id}/workspaces sub-resource for managing workspace enablement.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


128
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 128

required :workspace_id, String, nil?: true

#workspace_idsArray<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).

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


136
# File 'lib/anthropic/models/beta/organization/federation/beta_federation_rule.rb', line 136

required :workspace_ids, Anthropic::Internal::Type::ArrayOf[String]

Instance Method Details

#to_hash{

Returns:

  • ({)


94
# File 'sig/anthropic/models/beta/organization/federation/beta_federation_rule.rbs', line 94

def to_hash: -> {