Add node registration claim transport
This commit is contained in:
parent
b8680e82e1
commit
27cd1645da
8 changed files with 369 additions and 25 deletions
|
|
@ -18,6 +18,7 @@ import {
|
|||
NodeRegistrationSnapshotLoader,
|
||||
type NodeRegistrationSnapshotReceipt,
|
||||
} from './node-registration-snapshot.js';
|
||||
import type { NodeRegistrationClaimSource } from './node-registration-client.js';
|
||||
|
||||
const IDENTIFIER_PATTERN = /^[A-Z0-9][A-Z0-9._:-]{1,159}$/;
|
||||
|
||||
|
|
@ -31,19 +32,6 @@ export interface DomainIdentitySource {
|
|||
read(domainId: string, nodeType: DomainNodeType): Promise<DomainIdentityProjection>;
|
||||
}
|
||||
|
||||
export interface NodeRegistrationClaimRequest {
|
||||
accountId: string;
|
||||
domainId: string;
|
||||
endpointId: string;
|
||||
endpointUrl: string;
|
||||
nodeId: string;
|
||||
nodeType: DomainNodeType;
|
||||
}
|
||||
|
||||
export interface NodeRegistrationClaimSource {
|
||||
read(request: Readonly<NodeRegistrationClaimRequest>): Promise<unknown | null>;
|
||||
}
|
||||
|
||||
export interface DomainRuntimeHandoffCandidate {
|
||||
handoff: unknown;
|
||||
signerLookup: {
|
||||
|
|
@ -113,8 +101,7 @@ export class DomainAccessOrchestrator {
|
|||
const claim = await this.nodeRegistrations.read(Object.freeze({
|
||||
accountId: identity.accountId,
|
||||
domainId,
|
||||
endpointId: endpoint.endpointId,
|
||||
endpointUrl: endpoint.url,
|
||||
endpoint,
|
||||
nodeId: identity.nodeId,
|
||||
nodeType,
|
||||
}));
|
||||
|
|
|
|||
Loading…
Reference in a new issue