Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[tools]
node = "22.18.0"
node = "26"
18 changes: 9 additions & 9 deletions packages/acs-client/src/acs/authz.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,16 +296,15 @@ export class UnAuthZ implements IAuthZ {
* General authorizer. Marshalls data and requests access to the Access Control Service (ACS).
*/
export class ACSAuthZ implements IAuthZ {
acs: AccessControlServiceClient;
ownershipDomain: OwnershipDomainServiceClient;
/**
*
* @param acs Access Control Service definition (gRPC)
* @param ownershipDomain
*/
constructor(acs: AccessControlServiceClient, ownernshipDomain: OwnershipDomainServiceClient) {
this.acs = acs;
this.ownershipDomain = ownernshipDomain;
}
constructor(
public readonly acs: AccessControlServiceClient,
public readonly ownershipDomain: OwnershipDomainServiceClient
) {}

/**
* Perform request to access-control-srv
Expand Down Expand Up @@ -525,7 +524,8 @@ export const initAuthZ = async (config?: any, logger?: Logger): Promise<void | A
if (cfg.get('authorization:enabled')) {
const kafkaCfg = cfg.get('authorization:events:kafka') ?? cfg.get('events:kafka');
const acsName = cfg.get('authorization:service') ?? 'acs-srv';
const grpcACSConfig = cfg.get('authorization:client')?.[acsName] ?? cfg.get('client')?.[acsName];
const grpcACSConfig = cfg.get(`authorization:client:${acsName}`) ?? cfg.get(`client:${acsName}`);
const grpcODConfig = cfg.get('authorization:client:ownership-domain') ?? cfg.get('client:ownership-domain') ?? grpcACSConfig;
const acsClient: AccessControlServiceClient = createClient(
{
...grpcACSConfig,
Expand All @@ -535,10 +535,10 @@ export const initAuthZ = async (config?: any, logger?: Logger): Promise<void | A
);
const ownerhsipDomainClient: OwnershipDomainServiceClient = createClient(
{
...grpcACSConfig,
...grpcODConfig,
logger
}, OwnershipDomainServiceDefinition,
createChannel(grpcACSConfig.address),
createChannel(grpcODConfig.address),
);
authZ = new ACSAuthZ(acsClient, ownerhsipDomainClient);
unauthZ = new UnAuthZ(acsClient);
Expand Down
Loading