Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
github.com/sonroyaalmerol/ldap-saml-assertions
This project implements a fake LDAP server designed to facilitate SAML authentication. My main use-case for this is SOGo with Dovecot as its mail backend. While SOGo supports SAML, Dovecot does not, necessitating this custom solution. The fake LDAP server validates SAML assertions and mimics LDAP authentication, allowing seamless integration with Dovecot's passdb
configuration.
Clone the repository:
git clone https://github.com/yourusername/ldap-saml-assertions.git
cd ldap-saml-assertions
Build the application:
go build -o ldap-saml-assertions
Configure the application by creating a configuration file or by passing arguments directly.
Run the server with the following command:
./ldap-saml-assertions sp_cert=/path/to/sp-cert.pem sp_key=/path/to/sp-key.pem [other_arguments]
userid
: Attribute of the username within the SAML assertion (default: uid).sp_acs
: ACS value of service provider to match "SubjectConfirmationData" recipient.sp_cert
: Path to the SP X.509 certificate file (only applicable if assertions are encrypted).sp_key
: Path to the SP private key file (only applicable if assertions are encrypted).idp_metadata
: URL or path to the IdP metadata XML.To run the server with a certificate and key:
./ldap-saml-assertions sp_cert=/etc/ssl/certs/sp-cert.pem sp_key=/etc/ssl/private/sp-key.pem idp_metadata=https://example.com/idp/metadata.xml
To configure Dovecot to use this fake LDAP server, you can add the following lines to your Dovecot configuration (dovecot.conf
):
passdb {
driver = ldap
args = /path/to/your/ldap.conf
}
ldap.conf
for Dovecothosts = localhost:3389
ldap_version = 3
base = dc=saml
dn = cn=admin,dc=saml
dnpass = secret
auth_bind = yes
auth_bind_userdn = %u
Make sure to replace the placeholders with actual values relevant to your setup.
To test the LDAP server, you can use the ldapsearch
command as follows:
ldapsearch -x -H ldap://localhost:3389 -D "<uid>" -w "<base64 encoded SAML assertion>"
Replace <uid>
with the actual username you want to test.
Contributions are welcome! Feel free to submit issues or pull requests.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.