-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new configurations Remove DI container from dependency update documentation & readme
- Loading branch information
Showing
7 changed files
with
192 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ php_ldap | |
|
||
ssl configuration for LDAP. see see http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl | ||
|
||
Symfony 2.1 | ||
Compatible with Symfony 2.1, 2.2 and 2.3.x | ||
|
||
|
||
Installation | ||
|
@@ -41,9 +41,8 @@ You need to configure your domain specific information | |
real_primarygroup : true #For Linux compatibility. | ||
use_ssl : false #Set it true need configuration of the server to be usefull | ||
use_tls : false #Set it true need configuration of the server to be usefull | ||
recursive_groups : false #Used Only for group test (not userInfo) | ||
recursive_grouproles: false #recursive group roles | ||
sso : false #Use NTML. Not yet compatible with Symfony !!! | ||
username_validation_pattern: /^[a-z0-9-.]+$/i #Regex that check the final username value (extracted from patterns below). Must be complient with you Active directory acceptance. | ||
username_patterns: #username is extracted from the string the user put into the login form | ||
- /([^@]*)@riper.fr/i # like [email protected] | ||
- /RIPER\\(.*)/i #like RIPER\toto | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,78 @@ | ||
Active Directory authentication bundle | ||
============ | ||
Ztec/Security/ActiveDirectory | ||
====================================== | ||
|
||
To use this bundle, place it into your vendors with composer | ||
This package is a bundle for symfony 2.1. It use the standard form_login security model to authenticate user from an Active Directory domain. | ||
It use LDAP as communication layer. So you need the LDAP extension installed on your server to make it work. | ||
|
||
add this config to the main app/config | ||
ztec.security.active_directory.settings: | ||
Requirements | ||
---------------- | ||
php 5.2.4 | ||
|
||
php_ldap | ||
|
||
ssl configuration for LDAP. see see http://adldap.sourceforge.net/wiki/doku.php?id=ldap_over_ssl | ||
|
||
Symfony 2.1 | ||
|
||
|
||
Installation | ||
---------------- | ||
|
||
You need to add a package to your dependency list : | ||
|
||
//composer.json | ||
"ztec/security-active_directory": "dev-master" | ||
|
||
You need to enable the bundle into your kernel | ||
|
||
//app/AppKernel.php | ||
new Ztec\Security\ActiveDirectoryBundle\ZtecSecurityActiveDirectoryBundle(), | ||
|
||
You need to configure your domain specific information | ||
|
||
//app/config/config.yml or app/config/parameters.yml | ||
parameters: | ||
ztec.security.active_directory.settings: | ||
account_suffix : riper.fr # without the @ at the beginning | ||
base_dn : DC=RIPER,DC=FR #The DN of the domain | ||
domain_controllers : [ DC.riper.fr ] #Servers to use for ldap connexion (Random) | ||
domain_controllers : [ baudrive.kim.riper.fr ] #Servers to use for ldap connexion (Random) | ||
admin_username: #Null to use the userConnexion | ||
admin_password: #Null to use the userConnexion | ||
real_primarygroup : true #For Linux compatibility. | ||
use_ssl : false #Set it true need configuration of the server to be usefull | ||
use_tls : false #Set it true need configuration of the server to be usefull | ||
recursive_groups : false #Used Only for group test (not userInfo) | ||
sso : false | ||
username_patterns: #Define pattern allowed. The first selector is the username | ||
- /([^@]*)@riper.fr/i | ||
- /RIPER\\(.*)/i | ||
- /RIPER.FR\\(.*)/i | ||
- /(.*)/i | ||
recursive_grouproles: false #recursive group roles | ||
username_patterns: #username is extracted from the string the user put into the login form | ||
- /([^@]*)@riper.fr/i # like [email protected] | ||
- /RIPER\\(.*)/i #like RIPER\toto | ||
- /RIPER.FR\\(.*)/i #like RIEPER.FR\toto | ||
- /(.*)/i #like toto | ||
|
||
You need to add security parameters | ||
|
||
//app/config/security.yml | ||
encoders: | ||
Ztec\Security\ActiveDirectoryBundle\Security\User\adUser : plaintext #Active directory does not support encrypted password yet | ||
|
||
providers: | ||
my_active_directory_provider : | ||
id: ztec.security.active.directory.user.provider | ||
|
||
firewalls: | ||
secured_area: | ||
active_directory: #Sames parameters as form_login | ||
check_path: /demo/secured/login_check | ||
login_path: /demo/secured/login | ||
|
||
|
||
Useful information | ||
---------------------- | ||
|
||
Roles are got from Active directory. The name is transform to match the ROLE system of Symfony2 | ||
|
||
Domain User => ROLE_DOMAIN_USER | ||
Administrators = ROLE_ADMINISTRATORS | ||
|
||
Nested Group are not supported yet. Enabling the option wont affect the Role check | ||
|
||
SSL part of the lib isn't used yet and haven't been tested with Symfony |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.