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

Add support for LDAP authentication + Aliases #1475

Merged
merged 31 commits into from
Mar 12, 2024
Merged

Add support for LDAP authentication + Aliases #1475

merged 31 commits into from
Mar 12, 2024

Conversation

dangtony98
Copy link
Collaborator

@dangtony98 dangtony98 commented Feb 27, 2024

Description 📣

This PR adds support for the LDAP authentication method.

With this update, an admin can configure an organization in Infisical to connect to an LDAP server (e.g. Active Directory, JumpCloud LDAP, etc.). After doing so, users that log in via the LDAP method are created to exist within the corresponding organization in Infisical only and hence can only access that organization.

This includes:

  • Endpoints to create/update LDAP configuration for an organization.
  • LDAP authentication logic.
  • New aliases concept.
  • Permission + license logic for LDAP.
  • Database migrations and UX updates to support and prioritize username field for users hereon instead of email.
  • Documentation for how to set up the LDAP authentication method.

Type ✨

  • Bug fix
  • New feature
  • Breaking change
  • Documentation

@dangtony98 dangtony98 changed the title Add support for LDAP authentication Add support for LDAP authentication + Aliases Mar 6, 2024
backend/src/db/migrations/20240305165532_ldap-config.ts Outdated Show resolved Hide resolved
backend/src/db/seed-data.ts Show resolved Hide resolved
const doc = await orgBotDAL.findOne({ orgId }, tx);
if (doc) return doc;

const { privateKey, publicKey } = generateAsymmetricKeyPair();
Copy link
Member

Choose a reason for hiding this comment

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

Can we move the encryption to outside the transaction. Because the more time a transaction takes the more table lock in time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was thinking this at first but I think the encryption logic is actually not expensive; I've taken this from somewhere else in the codebase where this pattern was implemented.

backend/src/ee/services/ldap-config/ldap-config-service.ts Outdated Show resolved Hide resolved
docker-compose.dev.yml Show resolved Hide resolved
@dangtony98 dangtony98 merged commit 041535b into main Mar 12, 2024
14 of 15 checks passed
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.

None yet

2 participants