Open VincentClair opened 8 years ago
Hi Vincent, Thank you for your feedback, I really appreciate it.
Thanks
+1 for dynamic configuration
+1
We have Clients that use our service and they need to configure (optionally) their IdP and a "Login with SAML" will appear on their subdomain. There is no central IdP, the config must be loaded depending on current subdomain.
~If you know a bundle that has this feature, please share.~
LightSaml bundle did the job for me.
Thank you for the link, i will give it a try !
In my application, the admin can choose to activate or not SSO. When he activates it, i change dynamically yml files in config folder and load Bundle in AppKernel.
I have 3 yml files for sso config.
These 3 files are empty if sso is not activated and filled by code when sso is activated. These 3 files are always included by this way :
in routing.yml
import:
resource: sso_routing.yml
in config.yml
imports:
...
- { resource: sso_config.yml }
- { resource: sso_security.yml }
When sso is activated the contents are :
in sso_routing.yml
hslavich_saml_sp:
resource: '@HslavichOneloginSamlBundle/Resources/config/routing.yml'
in sso_config.yml
hslavich_onelogin_saml:
idp:
entityId: '...'
singleSignOnService:
.....
sp:
entityId: '...'
assertionConsumerService:
....
security:
nameIdEncrypted: false
....
in sso_security.yml
security:
firewalls:
main:
saml:
username_attribute: username
check_path: /saml/acs
login_path: /saml/login
failure_path: /login
always_use_default_target_path: false
user_factory: sso_user_factory
persist_user: true
logout:
path: /saml/logout
To load dynamically Bundle in AppKernel.php, il read parameters.yml :
public function registerBundles()
{
$paramYml = Yaml::parse(file_get_contents($this->getRootDir().'/config/parameters.yml'));
$bundles = array( .... );
if($paramYml['parameters']['sso_enabled'])
$bundles[] = new Hslavich\OneloginSamlBundle\HslavichOneloginSamlBundle();
}
As you can see, i change the parameter "sso_enabled" in parameters.yml when the admin activates or not the sso.
Hello,
I succeeded in installing the bundle in our application and make it work with ADFS.
Now, we would like to enhance our features:
Maybe there is other idea to make the installation / process / bundle more flexible and fluid. Do you plan some similare improvements ?
By the while, the bundle is really great and it makes already our development easier. Thanks