xq.api.validation package

Submodules

xq.api.validation.key_management module

xq.api.validation.key_management.add_packet(api, encrypted_key_packet: bytes)

upload an encrypted key packet to XQ https://xq.stoplight.io/docs/xqmsg/b3A6NDE4NTY2NDE-add-a-new-key-packet

Parameters:
  • api (XQAPI) – XQAPI instance

  • encrypted_key_packet (bytes) – key packet to upload

Raises:

XQException – packet creation failed

Returns:

locator token to access key later

Return type:

string

xq.api.validation.key_management.get_packet(api, locator_token: str)

fetch key with provided locator token https://xq.stoplight.io/docs/xqmsg/b3A6NDA5NDY4ODE-retrieve-a-key-with-its-token

Parameters:
  • api (XQAPI) – XQAPI instance

  • locator_token (str) – url encoded locator token

Raises:

XQException – packet retrieval failed

Returns:

key

Return type:

string

xq.api.validation.key_management.get_packets(api, locator_tokens: List[str])

fetch keys with provided locator tokens https://xq.stoplight.io/docs/xqmsg/b3A6NDA5NDY4ODE-retrieve-a-key-with-its-token

Parameters:
  • api (XQAPI) – XQAPI instance

  • locator_tokens (List[str]) – url encoded locator tokens

Raises:

XQException – packet retrieval failed

Returns:

key

Return type:

string

xq.api.validation.key_management.grant_users(api, locator_token: str, recipients: List[str], alias_access=False)

grant a list of recipients access to a given token https://xq.stoplight.io/docs/xqmsg/b3A6NDMzMTkyOTY-grant-a-user-access-to-a-key

Parameters:
  • api (XQAPI) – XQAPI instance

  • locator_token (str) – url encoded locator token

  • recipients (List[str]) – list of user emails to grant

  • alias_access (Boolean) – grant the user access for alias (non-MFA)

Raises:

XQException – access grant failed

Returns:

success

Return type:

boolean

xq.api.validation.key_management.revoke_packet(api, locator_token: str)

revoke a key packet with the provided locator token https://xq.stoplight.io/docs/xqmsg/b3A6NDA5NDY4ODI-revoke-access-to-a-key

Parameters:
  • api (XQAPI) – XQAPI instance

  • locator_token (str) – url encoded locator token

Raises:

XQException – packet revokation failed

Returns:

success

Return type:

bool

xq.api.validation.key_management.revoke_users(api, locator_token: str, recipients: List[str], alias_access=False)

revoke a list of recipents from accessing a given token https://xq.stoplight.io/docs/xqmsg/b3A6NDA5NDY4ODU-revoke-user-access

Parameters:
  • api (XQAPI) – XQAPI instance

  • locator_token (str) – url encoded locator token

  • recipients (List[str]) – list of user emails to revoke

  • alias_access (Boolean) – grant the user access for alias (non-MFA)

Raises:

XQException – acces revoke failed

Returns:

success

Return type:

boolean

Module contents