Skip to content

Commit 107595a

Browse files
committed
CLOUDSTACK-8457: SAML auth plugin improvements for production usage
* Move config options to SAML plugin This moves all configuration options from Config.java to SAML auth manager. This allows us to use the config framework. * Make SAML2UserAuthenticator validate SAML token in httprequest * Make logout API use ConfigKeys defined in saml auth manager * Before doing SAML auth, cleanup local states and cookies * Fix configurations in 4.5.1 to 4.5.2 upgrade path * Fail if idp has no sso URL defined * Add a default set of SAML SP cert for testing purposes Now to enable and use saml, one needs to do a deploydb-saml after doing a deploydb * UI remembers login selections, IDP server - CLOUDSTACK-8458: * On UI show dropdown list of discovered IdPs * Support SAML Federation, where there may be more than one IdP - New datastructure to hold metadata of SP or IdP - Recursive processing of IdP metadata - Fix login/logout APIs to get new interface and metadata data structure - Add org/contact information to metadata - Add new API: listIdps that returns list of all discovered IdPs - Refactor and cleanup code and tests - CLOUDSTACK-8459: * Add HTTP-POST binding to SP metadata * Authn requests must use either HTTP POST/Artifact binding - CLOUDSTACK-8461: * Use unspecified x509 cert as a fallback encryption/signing key In case a IDP's metadata does not clearly say if their certificates need to be used as signing or encryption and we don't find that, fallback to use the unspecified key itself. - CLOUDSTACK-8462: * SAML Auth plugin should not do authorization This removes logic to create user if they don't exist. This strictly now assumes that users have been already created/imported/authorized by admins. As per SAML v2.0 spec section 4.1.2, the SP provider should create authn requests using either HTTP POST or HTTP Artifact binding to transfer the message through a user agent (browser in our case). The use of HTTP Redirect was one of the reasons why this plugin failed to work for some IdP servers that enforce this. * Add new User Source By reusing the source field, we can find if a user has been SAML enabled or not. The limitation is that, once say a user is imported by LDAP and then SAML enabled - they won't be able to use LDAP for authentication * UI should allow users to pass in domain they want to log into, though it is optional and needed only when a user has accounts across domains with same username and authorized IDP server * SAML users need to be authorized before they can authenticate - New column entity to track saml entity id for a user - Reusing source column to check if user is saml enabled or not - Add new source types, saml2 and saml2disabled - New table saml_token to solve the issue of multiple users across domains and to enforce security by tracking authn token and checking the samlresponse for the tokens - Implement API: authorizeSamlSso to enable/disable saml authentication for a user - Stubs to implement saml token flushing/expiry - CLOUDSTACK-8463: * Use username attribute specified in global setting Use username attribute defined by admin from a global setting In case of encrypted assertion/attributes: - Decrypt them - Check signature if provided to check authenticity of message using IdP's public key and SP's private key - Loop through attributes to find the username - CLOUDSTACK-8538: * Add new global config for SAML request sig algorithm - CLOUDSTACK-8539: * Add metadata refresh timer task and token expiring - Fix domain path and save it to saml_tokens - Expire hour old saml tokens - Refresh metadata based on timer task - Fix unit tests This closes #489 (cherry picked from commit 20ce346) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> Conflicts: client/WEB-INF/classes/resources/messages_hu.properties plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixCheckHealthCommandWrapper.java plugins/user-authenticators/saml2/src/org/apache/cloudstack/api/command/SAML2LoginAPIAuthenticatorCmd.java ui/scripts/ui-custom/login.js
1 parent 527d6ee commit 107595a

File tree

54 files changed

+2152
-546
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2152
-546
lines changed

api/src/com/cloud/user/User.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
public interface User extends OwnedBy, InternalIdentity {
2424

2525
public enum Source {
26-
LDAP, UNKNOWN
26+
LDAP, SAML2, SAML2DISABLED, UNKNOWN
2727
}
2828

2929
public static final long UID_SYSTEM = 1;
@@ -84,4 +84,9 @@ public enum Source {
8484

8585
public Source getSource();
8686

87+
void setSource(Source source);
88+
89+
public String getExternalEntity();
90+
91+
public void setExternalEntity(String entity);
8792
}

api/src/com/cloud/user/UserAccount.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,8 @@ public interface UserAccount extends InternalIdentity {
6363
int getLoginAttempts();
6464

6565
public User.Source getSource();
66+
67+
public String getExternalEntity();
68+
69+
public void setExternalEntity(String entity);
6670
}

api/src/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ public class ApiConstants {
375375
public static final String ISOLATION_METHODS = "isolationmethods";
376376
public static final String PHYSICAL_NETWORK_ID = "physicalnetworkid";
377377
public static final String DEST_PHYSICAL_NETWORK_ID = "destinationphysicalnetworkid";
378+
public static final String ENABLE = "enable";
378379
public static final String ENABLED = "enabled";
379380
public static final String SERVICE_NAME = "servicename";
380381
public static final String DHCP_RANGE = "dhcprange";
@@ -518,7 +519,7 @@ public class ApiConstants {
518519
public static final String VMPROFILE_ID = "vmprofileid";
519520
public static final String VMGROUP_ID = "vmgroupid";
520521
public static final String CS_URL = "csurl";
521-
public static final String IDP_URL = "idpurl";
522+
public static final String IDP_ID = "idpid";
522523
public static final String SCALEUP_POLICY_IDS = "scaleuppolicyids";
523524
public static final String SCALEDOWN_POLICY_IDS = "scaledownpolicyids";
524525
public static final String SCALEUP_POLICIES = "scaleuppolicies";

client/WEB-INF/classes/resources/messages.properties

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ label.action.attach.iso=Attach ISO
115115
label.action.cancel.maintenance.mode.processing=Cancelling Maintenance Mode....
116116
label.action.cancel.maintenance.mode=Cancel Maintenance Mode
117117
label.action.change.password=Change Password
118+
label.action.configure.samlauthorization=Configure SAML SSO Authorization
118119
label.action.change.service.processing=Changing Service....
119120
label.action.change.service=Change Service
120121
label.action.copy.ISO.processing=Copying ISO....
@@ -763,7 +764,9 @@ label.local.storage=Local Storage
763764
label.local=Local
764765
label.login=Login
765766
label.logout=Logout
766-
label.saml.login=SAML Login
767+
label.saml.enable=Authorize SAML SSO
768+
label.saml.entity=Identity Provider
769+
label.add.LDAP.account=Add LDAP Account
767770
label.LUN.number=LUN \#
768771
label.lun=LUN
769772
label.make.project.owner=Make account project owner

client/WEB-INF/classes/resources/messages_fr_FR.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,6 @@ label.s3.nfs.server=Serveur NFS S3
12891289
label.s3.secret_key=Cl\u00e9 Priv\u00e9e
12901290
label.s3.socket_timeout=D\u00e9lai d\\'expiration de la socket
12911291
label.s3.use_https=Utiliser HTTPS
1292-
label.saml.login=Identifiant SAML
12931292
label.saturday=Samedi
12941293
label.save.and.continue=Enregistrer et continuer
12951294
label.save=Sauvegarder

client/WEB-INF/classes/resources/messages_hu.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1282,7 +1282,6 @@ label.s3.nfs.server=S3 NFS kiszolg\u00e1l\u00f3
12821282
label.s3.secret_key=Titkos kulcs
12831283
label.s3.socket_timeout=Kapcsolat id\u0151t\u00fall\u00e9p\u00e9s
12841284
label.s3.use_https=HTTPS haszn\u00e1lata
1285-
label.saml.login=SAML bejelentkez\u00e9s
12861285
label.saturday=Szombat
12871286
label.save.and.continue=Ment\u00e9s \u00e9s folytat\u00e1s
12881287
label.save=Ment\u00e9s

client/tomcatconf/commands.properties.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ logout=15
2626
samlSso=15
2727
samlSlo=15
2828
getSPMetadata=15
29+
listIdps=15
30+
authorizeSamlSso=7
31+
listSamlAuthorization=7
2932

3033
### Account commands
3134
createAccount=7

developer/developer-prefill.sql

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,4 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
8383
VALUES ('Advanced', 'DEFAULT', 'management-server',
8484
'developer', 'true');
8585

86-
-- Enable SAML plugin for developers by default
87-
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
88-
VALUES ('Advanced', 'DEFAULT', 'management-server',
89-
'saml2.enabled', 'true');
90-
9186
commit;

developer/developer-saml.sql

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
-- SAML keystore for testing, allows testing on ssocirlce and other public IdPs
19+
-- with pre-seeded SP metadata
20+
USE cloud;
21+
22+
-- Enable SAML plugin for developers by default
23+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
24+
VALUES ('Advanced', 'DEFAULT', 'SAML2-PLUGIN',
25+
'saml2.enabled', 'true')
26+
ON DUPLICATE KEY UPDATE value=VALUES(value);
27+
28+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
29+
VALUES ('Advanced', 'DEFAULT', 'SAML2-PLUGIN',
30+
'saml2.default.idpid', 'https://idp.bhaisaab.org/idp/shibboleth')
31+
ON DUPLICATE KEY UPDATE value=VALUES(value);
32+
33+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
34+
VALUES ('Advanced', 'DEFAULT', 'SAML2-PLUGIN',
35+
'saml2.idp.metadata.url', 'http://idp.bhaisaab.org/idp/shibboleth')
36+
ON DUPLICATE KEY UPDATE value=VALUES(value);
37+
38+
-- Enable LDAP source
39+
INSERT INTO `cloud`.`ldap_configuration` (hostname, port)
40+
VALUES ('idp.bhaisaab.org', 389);
41+
42+
-- Fix ldap configs
43+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
44+
VALUES ('Advanced', 'DEFAULT', 'management-server',
45+
'ldap.basedn', 'ou=people,dc=idp,dc=bhaisaab,dc=org')
46+
ON DUPLICATE KEY UPDATE value=VALUES(value);
47+
48+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
49+
VALUES ('Advanced', 'DEFAULT', 'management-server',
50+
'ldap.bind.principal', 'cn=admin,dc=idp,dc=bhaisaab,dc=org')
51+
ON DUPLICATE KEY UPDATE value=VALUES(value);
52+
53+
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
54+
VALUES ('Advanced', 'DEFAULT', 'management-server',
55+
'ldap.bind.password', 'password')
56+
ON DUPLICATE KEY UPDATE value=VALUES(value);
57+
58+
-- Add default set of certificates for testing
59+
LOCK TABLES `keystore` WRITE;
60+
/*!40000 ALTER TABLE `keystore` DISABLE KEYS */;
61+
INSERT INTO `keystore` VALUES (1,'SAMLSP_KEYPAIR','MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQDQDirtAajTrScXCUgXrsOBgQ++y+IUcyzXwUGEYBlM9kBCmcdlbt5zuYQ8pOvoOQz6CAVqSjYNbnbg1ph37Zfv/tzGUg2V5cpB5BfEyt2KY0mBFNbwa0LKnCAYlBlarm4XZF+oZ0maH6cdboHdHiEqNRscylnXYA2zHKU3YoEfOR+9acl4z54PAyuPjr9SWUPTAyYf326i0q+h3J4nT6FwBFK+yKSC1PeVG/viYQ0otU1UUDkQ3pX81qfJfN/6Ih7W4v73LgUlZsTBMzlu/kJzMuP5Wc5IkU6Mt+8EHMZeLnN0ZErkMk0DCQE14hG8W7S8/inUJpwJlmb5E634Zq8u0I1zVUmSmAGqvvqKJBGnqY5X/j2bsA8B2qFsrcxasIlkKaWLvY+AvXD5X0OHwIZzRbuuCtguSz671C7Cwok8R3N+e9ATDHmG9gC10NJaB6dUBA9p2UdA82TR73x6nGe8pLJnGyecEQfxz1+ptPVAENj1Rl3Wrwu/dbPd/X6inlYpuwlsnWi3LYrkguT/9W3Z2uuq5PTVT04zcyev+50gVnDPzTrNCZfHpmMNQIqZGFmFKz4m+VUZmzZOdg1Vx51t9+t7iHGHqFk6/vnqqWiyEu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DQYJKoZIhvcNAQELBQADggIBAHZWSGpypDmQLQWr2FCVQUnulbPuMMJ0sCH0rNLGLe8qNbZ0YeAuWFsg7+0kVGZ4OuDgioIhD0h3Q3huZtF/WF81eyZqPyVfkXG8egjK58AzMDPHZECeoSVGUCZuq3wjmbnT2sLLDvr8RrzMbbCEvkrYHWivQ18Lbd3eWYYnDbXZRy9GuSWrA9cMqXVYjSTxam9Kel33BIF6CAlMQN5o11oiAv+ciNoxHqGh+8xX3kFKP+x+SRt40NOEs537lEpj/6KdLvd/bP6J4K94jAX3lsdg6zDaBiQWl7P3t50AKtP384Qsb/33uXcbTyw/TkzvPcbmsgTbEUTZIOv44CxMstFrUCyT7ptrzLvDk7Iy2cMgWghULgDvKT3esPE9pleyHG8bkjGt9ypDF/Lmp7j/kILYbF7eq1wIbHOSam4p8WyddVsW4nesu6fqLiCGXum9paChIfvL3To/VHFFKduhJd0Y7LMgWO7pXxWh7XfgRmzQaEN1eJmj5315HEYTS2wXWjptwYDrhiobKuCbpADfOQks8xNKJFLMnXp+IvAqz+ZjkNOz60MLuQ3hvKLTo6nQcTYTfZZxo3Aap30/hA2GtxxSXK/xpBDm58jcVoudgCdxML/OqERBfcADBLvIw5h9+DlXjPUg25IefU0oA336YtnzftJ6cfQfatrc0tBqNEeXdAAFWC41MDk=','','samlsp-x509cert',NULL);
62+
/*!40000 ALTER TABLE `keystore` ENABLE KEYS */;
63+
UNLOCK TABLES;

developer/pom.xml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,64 @@
157157
</plugins>
158158
</build>
159159
</profile>
160+
<profile>
161+
<!-- saml deploydb property -->
162+
<id>deploydb-saml</id>
163+
<activation>
164+
<property>
165+
<name>deploydb-saml</name>
166+
</property>
167+
</activation>
168+
<build>
169+
<plugins>
170+
<plugin>
171+
<groupId>org.codehaus.mojo</groupId>
172+
<artifactId>exec-maven-plugin</artifactId>
173+
<dependencies>
174+
<dependency>
175+
<groupId>mysql</groupId>
176+
<artifactId>mysql-connector-java</artifactId>
177+
<version>${cs.mysql.version}</version>
178+
</dependency>
179+
</dependencies>
180+
<version>1.2.1</version>
181+
<executions>
182+
<execution>
183+
<phase>process-resources</phase>
184+
<id>create-schema-simulator</id>
185+
<goals>
186+
<goal>java</goal>
187+
</goals>
188+
</execution>
189+
</executions>
190+
<configuration>
191+
<mainClass>com.cloud.upgrade.DatabaseCreator</mainClass>
192+
<includePluginDependencies>true</includePluginDependencies>
193+
<arguments>
194+
<!-- db properties file -->
195+
<argument>${basedir}/../utils/conf/db.properties</argument>
196+
<argument>${basedir}/../utils/conf/db.properties.override</argument>
197+
<!-- simulator sql files -->
198+
<argument>${basedir}/developer-saml.sql</argument>
199+
<!-- upgrade -->
200+
<argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument>
201+
<argument>--rootpassword=${db.root.password}</argument>
202+
</arguments>
203+
<systemProperties>
204+
<systemProperty>
205+
<key>catalina.home</key>
206+
<value>${basedir}/../utils</value>
207+
</systemProperty>
208+
<systemProperty>
209+
<key>paths.script</key>
210+
<value>${basedir}/target/db</value>
211+
</systemProperty>
212+
</systemProperties>
213+
</configuration>
214+
</plugin>
215+
</plugins>
216+
</build>
217+
</profile>
160218
<profile>
161219
<!-- simulator deploydb property -->
162220
<id>deploydb-simulator</id>

0 commit comments

Comments
 (0)