Foundry.SecretService

g Foundry.Contextual Foundry.Contextual Foundry.Service Foundry.Service Foundry.Contextual->Foundry.Service Foundry.SecretService Foundry.SecretService Foundry.Service->Foundry.SecretService GObject.GInterface GObject.GInterface Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Service (8), Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8)

Structs:

Foundry.ServiceClass (3), GObject.ObjectClass (5)

check_expires_at (host, service)

delete_api_key (host, service)

lookup_api_key (host, service)

rotate_api_key (host, service, expire_at)

store_api_key (host, service, api_key)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5)

Properties

Inherited:

Foundry.Contextual (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class Foundry.SecretService(**kwargs)
Bases:

Foundry.Service

Abstract:

No

Structure:

Foundry.SecretServiceClass

Manages secure storage and retrieval of API keys and sensitive data.

Foundry.SecretService provides a secure interface for storing and retrieving API keys, authentication tokens, and other sensitive information. It integrates with the system’s secret storage backend and provides a unified API for managing credentials across different services and platforms.

check_expires_at(host, service)
Parameters:
  • host (str) – the hostname of the api server

  • service (str) – the name of the service such as “gitlab”

Returns:

a [class`Dex`.Future] that resolves to a GLib.DateTime on success; or rejects with error.

Return type:

Dex.Future

Checks when the API key expires for the host/service pair.

New in version 1.1.

delete_api_key(host, service)
Parameters:
  • host (str) – the hostname of the api server

  • service (str) – the name of the service such as “gitlab”

Returns:

a [class`Dex`.Future] that resolves to any value on success or rejects with error.

Return type:

Dex.Future

Removes an API key from secret storage.

New in version 1.1.

lookup_api_key(host, service)
Parameters:
  • host (str) – the hostname of the api server

  • service (str) – the name of the service such as “gitlab”

Returns:

a [class`Dex`.Future] that resolves to a string on success or rejects with error.

Return type:

Dex.Future

Retrieves an API key from secret storage.

New in version 1.1.

rotate_api_key(host, service, expire_at)
Parameters:
  • host (str) – the hostname of the api server

  • service (str) – the name of the service such as “gitlab”

  • expire_at (GLib.DateTime or None) – when the new key should expire, or None

Returns:

a [class`Dex`.Future] that resolves to the new API key as a string on success; or rejects with error.

Return type:

Dex.Future

Rotates the API key for the host/service pair.

New in version 1.1.

store_api_key(host, service, api_key)
Parameters:
  • host (str) – the hostname of the api server

  • service (str) – the name of the service such as “gitlab”

  • api_key (str) – the actual API key

Returns:

a [class`Dex`.Future] that resolves to any value on success or rejects with error.

Return type:

Dex.Future

Stores an API key in secret storage.

New in version 1.1.