Skip to content

Organizations

Organization is a base unit of tenancy in Document Rails.

Almost all Document Rails resources are attached to a single organization. Organizations are isolated, so all resources created within an organization are utilized only within this organization too.

You can use organizations to organize your projects, company divisions, offices, etc.

import { createOrganization } from "@vaultie/document-rails";

const response = await createOrganization(client, accessToken, {
    // Organization name.
    name: "Test organization",

    // This is the base URL for all credential QR codes.
    //
    // Not to be mistaken with credential offer QR codes,
    // which are configured separately.
    qr_code_base_url: "https://example.com/viewer#",

    // Let Document Rails manage status lists automatically.
    auto_status_list: true,

    // Status list publisher URL.
    slp_url: "https://slp.example.com",
});

User management

Regular users have to be attached to an organization to access its resources.

import { attachUserToOrganization } from "@vaultie/document-rails";

await attachUserToOrganization(
    client,
    accessToken,
    organizationId,
    userId
);
import { detachUserToOrganization } from "@vaultie/document-rails";

await detachUserToOrganization(
    client,
    accessToken,
    organizationId,
    userId
);

Organization configuration

Organizations feature some "global" configuration options:

  • auto_status_list - whether to let Document Rails automatically manage status lists for this organization.

  • slp_url - status list publisher URL. If not provided, Document Rails will utilize the built-in status list publisher.

  • status_list_w3c_key - Identifier of the signing key used to sign W3C status lists during the publishing process.

  • status_list_mdoc_key - Identifier of the signing key used to sign IETF TSL status lists during the publishing process.

  • inbound_webhook_key - Identifier of the signing key used to sign inbound webhook requests. If not provided, inbound webhook requests are disabled organization-wide.

  • outbound_webhook_key - Identifier of the signing key used to sign outbound webhook requests. If not provided, outbound webhook requests are sent without the authentication information.

  • qr_code_base_url - Base URL for QR codes created during the recipe printing process. If not provided, QR code rendering is disabled organization-wide.