Skip to content

Commit

Permalink
fix: remove apiKey listener
Browse files Browse the repository at this point in the history
  • Loading branch information
Arun-KumarH committed Jun 28, 2024
1 parent 1985293 commit b1ec9d1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
6 changes: 0 additions & 6 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,12 +714,6 @@ export class UserService extends ServiceBase<UserListResponse, UserList> impleme
this.logger.error('Error making wahtIsAllowedACS request for verifying role associations', { code: err.code, message: err.message, stack: err.stack });
return returnStatus(err.code, err.message, usersList[0].id);
}
// for apiKey no need to verify role assocs
const configuredApiKey = this.cfg.get('authentication:apiKey');
if ((acsResponse.decision === Response_Decision.PERMIT) &&
(configuredApiKey && subject.token && configuredApiKey === subject.token)) {
return;
}
if ((acsResponse as PolicySetRQResponse)?.policy_sets?.length > 0) {
const policiesList = (acsResponse as PolicySetRQResponse).policy_sets[0].policies;
if (policiesList?.length > 0) {
Expand Down
6 changes: 0 additions & 6 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ class UserCommandInterface extends chassis.CommandInterface {
};
}

async setApiKey(payload: any): Promise<any> {
const commandResponse = await super.setApiKey(payload);
updateConfig(this.config);
return commandResponse;
}

async configUpdate(payload: any): Promise<any> {
const commandResponse = await super.configUpdate(payload);
updateConfig(this.config);
Expand Down

0 comments on commit b1ec9d1

Please sign in to comment.