Interface RowLevelSecurity


@SPI({USE,IMPLEMENT,SUPPLY}) public interface RowLevelSecurity

Defines the database capabilities, schema DDL, and connection operation used for database-native row-level security.

Implement this contract with immutable, thread-safe state. Inspect only the ephemeral RowLevelSecurityDdlRequest supplied for the current table, return declarative DDL descriptors, and do not retain the request.

Since:
8.0
See Also:
  • Method Details

    • supportsRowLevelSecurity

      boolean supportsRowLevelSecurity()
      Report whether this strategy supports database-native row-level security.
    • supportsTenantIdentifierSource

      boolean supportsTenantIdentifierSource(TenantIdentifierSource source)
      Report whether policies may obtain the tenant identifier from the specified database-side source.
    • getTenantTableDdl

      Describe, in deterministic order, the schema commands required for the supplied tenant table. Use all rendered names in the request verbatim and return an immutable list.
    • setTenantIdentifier

      void setTenantIdentifier(Connection connection, String tenantIdentifier, boolean root) throws SQLException
      Apply the current tenant identifier to the JDBC connection. Implementations supporting only TenantIdentifierSource.DATABASE_USER may make this a no-op.
      Throws:
      SQLException