From f35f3f6a965670528e5e7ed3f4356b961b3bb166 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 8 Jul 2024 02:28:54 -0400 Subject: [PATCH 1/5] UI: create network form constantly tries to list domains - which is not permitted for normal users (#9348) --- ui/src/views/network/CreateIsolatedNetworkForm.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/views/network/CreateIsolatedNetworkForm.vue b/ui/src/views/network/CreateIsolatedNetworkForm.vue index 67b5ed4c4b7..1da1908e7a5 100644 --- a/ui/src/views/network/CreateIsolatedNetworkForm.vue +++ b/ui/src/views/network/CreateIsolatedNetworkForm.vue @@ -449,7 +449,9 @@ export default { }) }, fetchData () { - this.fetchDomainData() + if (this.isAdminOrDomainAdmin()) { + this.fetchDomainData() + } this.fetchZoneData() this.allowSettingMTU() }, From c35ba606a10242a218d0686015288d8363cf30d5 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Mon, 8 Jul 2024 17:24:38 +0530 Subject: [PATCH 2/5] ui: fix account list on domain change in filterview (#9345) * ui: fix account list on domain change in filterview Fixes #9274 * fix * filter accounts for selected domain Signed-off-by: Abhishek Kumar --- ui/src/components/view/SearchView.vue | 35 +++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/ui/src/components/view/SearchView.vue b/ui/src/components/view/SearchView.vue index c284b8a635a..a43dfabf868 100644 --- a/ui/src/components/view/SearchView.vue +++ b/ui/src/components/view/SearchView.vue @@ -66,12 +66,13 @@ return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 }" :loading="field.loading" - @input="onchange($event, field.name)"> + @input="onchange($event, field.name)" + @change="onSelectFieldChange(field.name)"> + :value="['account'].includes(field.name) ? opt.name : opt.id" + :label="$t((['storageid'].includes(field.name) || !opt.path) ? opt.name : opt.path)">
@@ -85,7 +86,7 @@ - {{ $t(opt.path || opt.name) }} + {{ $t((['storageid'].includes(field.name) || !opt.path) ? opt.name : opt.path) }}
@@ -241,6 +242,11 @@ export default { onchange: async function (event, fieldname) { this.fetchDynamicFieldData(fieldname, event.target.value) }, + onSelectFieldChange (fieldname) { + if (fieldname === 'domainid') { + this.fetchDynamicFieldData('account') + } + }, onVisibleForm () { this.visibleFilter = !this.visibleFilter if (!this.visibleFilter) return @@ -563,6 +569,9 @@ export default { if (domainIndex > -1) { this.fields[domainIndex].loading = false } + if (accountIndex > -1) { + this.fields[accountIndex].loading = false + } if (imageStoreIndex > -1) { this.fields[imageStoreIndex].loading = false } @@ -584,7 +593,9 @@ export default { if (diskOfferingIndex > -1) { this.fields[diskOfferingIndex].loading = false } - this.fillFormFieldValues() + if (Array.isArray(arrayField)) { + this.fillFormFieldValues() + } }) }, initFormFieldData () { @@ -595,6 +606,9 @@ export default { this.fetchDynamicFieldData(arrayField) }, sortArray (data, key = 'name') { + if (!data) { + return [] + } return data.sort(function (a, b) { if (a[key] < b[key]) { return -1 } if (a[key] > b[key]) { return 1 } @@ -644,8 +658,15 @@ export default { }, fetchAccounts (searchKeyword) { return new Promise((resolve, reject) => { - api('listAccounts', { listAll: true, showicon: true, keyword: searchKeyword }).then(json => { - const account = json.listaccountsresponse.account + const params = { listAll: true, isrecursive: false, showicon: true, keyword: searchKeyword } + if (this.form.domainid) { + params.domainid = this.form.domainid + } + api('listAccounts', params).then(json => { + var account = json.listaccountsresponse.account + if (this.form.domainid) { + account = account.filter(a => a.domainid === this.form.domainid) + } resolve({ type: 'account', data: account From f381763917a73420a4dbc553ec800bf5c153da8b Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 8 Jul 2024 21:48:50 +0200 Subject: [PATCH 3/5] test: fix simulator CI failure test_cluster_drs (#9354) --- test/integration/smoke/test_cluster_drs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration/smoke/test_cluster_drs.py b/test/integration/smoke/test_cluster_drs.py index 8b4801849fd..f1eb48f92f5 100644 --- a/test/integration/smoke/test_cluster_drs.py +++ b/test/integration/smoke/test_cluster_drs.py @@ -100,7 +100,9 @@ class TestClusterDRS(cloudstackTestCase): ) cls._cleanup.append(cls.network) - cls.migrateSvms(cls.cluster) + cls.hypervisor = cls.testClient.getHypervisorInfo() + if cls.hypervisor.lower() not in ['simulator']: + cls.migrateSvms(cls.cluster) @classmethod def migrateSvms(cls, cluster): From 7977d1475e23c1a801d7d300810e0dd2d429158f Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Tue, 9 Jul 2024 09:49:27 +0530 Subject: [PATCH 4/5] plugins: make default signature check mandatory (#9357) This improves upon #9219, to make the signature checks mandatory by default but allows for users to relax the setting if they really must. Signed-off-by: Rohit Yadav --- .../main/java/org/apache/cloudstack/saml/SAML2AuthManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAML2AuthManager.java b/plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAML2AuthManager.java index a5dae36581c..27f17cee6b1 100644 --- a/plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAML2AuthManager.java +++ b/plugins/user-authenticators/saml2/src/main/java/org/apache/cloudstack/saml/SAML2AuthManager.java @@ -70,7 +70,7 @@ public interface SAML2AuthManager extends PluggableAPIAuthenticator, PluggableSe ConfigKey SAMLTimeout = new ConfigKey("Advanced", Integer.class, "saml2.timeout", "1800", "SAML2 IDP Metadata refresh interval in seconds, minimum value is set to 300", true); - ConfigKey SAMLCheckSignature = new ConfigKey("Advanced", Boolean.class, "saml2.check.signature", "false", + ConfigKey SAMLCheckSignature = new ConfigKey("Advanced", Boolean.class, "saml2.check.signature", "true", "Whether SAML2 signature must be checked, when enforced and when the SAML response does not have a signature would lead to login exception", true); public SAMLProviderMetadata getSPMetadata(); From ca66b76cb92be368bbea40a3bdb2f4e54c0a32d2 Mon Sep 17 00:00:00 2001 From: Henrique Sato Date: Fri, 7 Jun 2024 04:55:54 -0300 Subject: [PATCH 5/5] Fix instance & backup resource table columns (#9147) Co-authored-by: Henrique Sato --- ui/src/components/view/ListResourceTable.vue | 25 ++++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/ui/src/components/view/ListResourceTable.vue b/ui/src/components/view/ListResourceTable.vue index 16c1b388c5d..a7e805b5443 100644 --- a/ui/src/components/view/ListResourceTable.vue +++ b/ui/src/components/view/ListResourceTable.vue @@ -41,21 +41,20 @@ + + + + + + - - - - - - -