Class SqlServerE2eMetadata
- Namespace
- ItTiger.TigerQuery.Core
- Assembly
- ItTiger.TigerQuery.Core.dll
public static class SqlServerE2eMetadata
- Inheritance
-
SqlServerE2eMetadata
- Inherited Members
Remarks
The governing rule is that reachability is not authorization. A profile becomes
usable for E2E work only because someone deliberately wrote
Enabled=true into it. A valid, connectable, perfectly ordinary
development profile is never eligible, whatever it is called and wherever it sits in
the store.
General E2E authorization is not bootstrap authorization. A bootstrap profile must be
selected by the caller's or host's expected name and must also carry
Bootstrap=true. Neither the name nor the metadata is sufficient on
its own — see SqlServerE2eConnectionResolver.
Profile metadata is compared ordinally and case-sensitively, so the grammar is exact:
keys are matched as written here, lower-case, and Boolean values are the literal
True and False. ITTIGER.E2E.ENABLED, True,
1, yes, and true are not accepted spellings — nothing
is trimmed, lower-cased, or interpreted.
The ReservedKeyPrefix namespace belongs to TigerQuery. Applications must keep their own metadata under their own prefix; a key TigerQuery does not define today may gain a meaning in a later release. Keys under the prefix that this version does not recognize are ignored during resolution, so a store written by a newer TigerQuery still loads.
Fields
AllowDatabaseCreation
ittiger.e2e.allow-database-create — E2E workflows may create databases
through this profile. Checked only when a caller asks for that permission, and
never implied by Enabled.public const string AllowDatabaseCreation = "ittiger.e2e.allow-database-create"
Field Value
AllowDatabaseDrop
public const string AllowDatabaseDrop = "ittiger.e2e.database.allow-drop"
Field Value
Bootstrap
ittiger.e2e.bootstrap — the profile is authorized to act as an E2E bootstrap
connection. Required, and required to be exactly True, in addition to
selecting the profile by its expected name and requiring Enabled.public const string Bootstrap = "ittiger.e2e.bootstrap"
Field Value
DatabaseName
public const string DatabaseName = "ittiger.e2e.database.name"
Field Value
Enabled
ittiger.e2e.enabled — the profile may be used by TigerQuery E2E
infrastructure. Required, and required to be exactly True.public const string Enabled = "ittiger.e2e.enabled"
Field Value
False
public const string False = "false"
Field Value
ReservedKeyPrefix
public const string ReservedKeyPrefix = "ittiger.e2e."
Field Value
Remarks
SessionId
public const string SessionId = "ittiger.e2e.session-id"
Field Value
True
public const string True = "true"
Field Value
Methods
AuthorizeNewBootstrapProfile(SqlServerConnectionProfile, bool)
public static void AuthorizeNewBootstrapProfile(SqlServerConnectionProfile profile, bool allowDatabaseCreation = false)
Parameters
profileSqlServerConnectionProfile- The bootstrap profile being created.
allowDatabaseCreationbool- Whether E2E infrastructure is also authorized to create databases through the profile.
Remarks
=true authorizes
the selected profile to act as the bootstrap. Both are required.Exceptions
- ArgumentNullException
profileis null.
AuthorizeNewProfile(SqlServerConnectionProfile, bool)
public static void AuthorizeNewProfile(SqlServerConnectionProfile profile, bool allowDatabaseCreation = false)
Parameters
profileSqlServerConnectionProfile- The profile being created.
allowDatabaseCreationbool- Whether E2E infrastructure is also authorized to create databases through the profile.
Remarks
Exceptions
- ArgumentNullException
profileis null.
ConfigureSessionProfile(SqlServerConnectionProfile, Guid, string, bool)
public static void ConfigureSessionProfile(SqlServerConnectionProfile profile, Guid sessionId, string databaseName, bool allowDatabaseDrop)
Parameters
profileSqlServerConnectionProfile- The new non-bootstrap E2E profile.
sessionIdGuid- The non-empty safety-correlation identifier.
databaseNamestring- The exact database targeted by the profile.
allowDatabaseDropbool- Whether dedicated E2E cleanup owns the database.
IsReservedKey(string)
public static bool IsReservedKey(string key)
Parameters
keystring- The key to test.
Returns
- bool
- true when
keystarts with ReservedKeyPrefix, compared ordinally.
Remarks
ITTIGER. is a different namespace and TigerQuery neither
claims nor reads it.Exceptions
- ArgumentNullException
keyis null.
PreserveReservedMetadata(SqlServerConnectionProfile, SqlServerConnectionProfile)
public static void PreserveReservedMetadata(SqlServerConnectionProfile source, SqlServerConnectionProfile destination)
Parameters
sourceSqlServerConnectionProfile- The existing profile.
destinationSqlServerConnectionProfile- The replacement profile.
Remarks
ReadFlag(SqlServerConnectionProfile, string)
public static SqlServerE2eFlagState ReadFlag(SqlServerConnectionProfile profile, string key)
Parameters
profileSqlServerConnectionProfile- The profile whose metadata is inspected.
keystring- The reserved key to read.
Returns
- SqlServerE2eFlagState
- Absent when the key is not present, True or False for an exact match, and Malformed for anything else — including an empty value and a value that differs only in case or surrounding whitespace.
Remarks
Exceptions
- ArgumentNullException
profileis null.- ArgumentException
keyis null or empty. The parameter name iskey.