Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tenant-management):integrate auth0 #48

Closed
wants to merge 5 commits into from
Closed

Conversation

Surbhi-sharma1
Copy link
Collaborator

Description

integrate auth0 in tenant management service
Fixes #47

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

add keycloak idp configuration

BREAKING CHANGE:
yes

43
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the trigger to update the modified_on time whenever there is an update

jsonSchema: getJsonSchema(Object),
})
plan: AnyObject;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plans will be separate not a part of tenant

Comment on lines +25 to +31
@property({
type: 'object',
required: true,
name: 'config_value',
})
configValue: ConfigValue;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the configValue type defined like this
it not specific to just auth0 and organizations
its a generic table that can be used for anything in future
its just a json value https://github.com/sourcefuse/loopback4-microservice-catalog/blob/master/services/authentication-service/src/models/tenant-config.model.ts

KEYCLOAK = 'keycloak',
}

export type ConfigureIdpFunc<T> = (payload: IdpDetails) => Promise<T>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name of this type

Comment on lines 35 to 45
const tenantConfig = await this.tenantConfigRepository.findOne({
where: {tenantId: tenant.id},
});
if (!tenantConfig) {
throw new HttpErrors.NotFound(
`Tenant configuration not found for tenant: ${tenant.id}`,
);
}
const configValue: ConfigValue = tenantConfig.configValue;
if (!configValue) {
throw new HttpErrors.NotFound(
`Tenant configuration not found for tenant: ${tenant.id}`,
);
}

const organizationData: OrganizationData = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenant_config depends on two things
tenant_id and config_key
please take key also into account as I can store diff types of config for a tenant

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why userdata and organizationdata types defined
arent these defined in the auth0 management package

@yeshamavani
Copy link
Collaborator

Also is this #38 PR included in this new PR ??
@Surbhi-sharma1 @Tyagi-Sunny

Copy link

sonarcloud bot commented Sep 27, 2024

@Surbhi-sharma1
Copy link
Collaborator Author

#51
closing as raised above PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add auth0 support for idp configuration in tenant managemnt service
3 participants