Skip to content

Commit 9540f22

Browse files
authored
Merge branch 'main' into add_larger_flavors
2 parents 048c80a + 24b8033 commit 9540f22

File tree

7 files changed

+59
-5
lines changed

7 files changed

+59
-5
lines changed

.zuul.d/secure.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,28 @@
7979
o9slrGAyL7g3zdjNlUJA04U33SNCvaCxL8fac6JZ15vrqeW4g4AB4+rx7fYKAnOVg2FOL
8080
5jMOKsiGgfLvz1KZ9c6Q1ThfeCQzG9waWJnyCx2R2tEtyQ17hIW6Rzo1RzmQkUyvLN9TJ
8181
CLSZCUoR+2Ut+ZlpDi3vVushWWLXyjj8ojblTO/zqlbQ1A+7d/C+5x2mrh2T/0=
82+
cnds_ro_ac_id: !encrypted/pkcs1-oaep
83+
- l2IMEJwkw8xqgzKvCkPgGVzoBNiMrj/+oNfq3dvFyLU8f/AJ8XDMsmaeNBj/hSGY6O3ar
84+
Qs8ckn6BUTD253Ft8izsvv7E535KN/o5IhN7f+juKri1jVus/XLkrx3t3exHL1piSy0y/
85+
y5k1FGpEclmzyEdtaCorEOQraXRCLAOmyYba6aCt5YhPVJkOjv8Aupy7Y/tSHXdsFKgZt
86+
fJItALWehZVbYtl4WHpmrPwV0uW8mKo/T41o2aJDJ3a2BRodqVvTNSZb9YNnLyBkxW+Kc
87+
w1AAk9E2U+tinWxFAJQAE42JZIesv6F9SoJhl9ViYsENjNtwdpndrrF1j2BmmiqJ1kVwp
88+
y4UHnheNUBsIXe2RUnRq2z0m0rQ/kyQQSTluUV0QGnb34a3GuMqPCsiAAbFRuL6Ax8zXu
89+
UoQ+C6BCNXJJzyjbJC9CLILqHLqZUCkYimiBf4+GmoDEANNi5FUZgtwK0p9TJN/7KvLJ0
90+
h+73PtoCnVrnsYcaEu+tJO3Jfm43tilTRixTtVbWL1F+dgnBCdh3dFHm3l16npEMxpyR9
91+
2P6BKyeROBAwaBURc3UhtqZjwMc+YmYLGXRDjd/DKyLHJ0j27ONWCtQHbRzJZjxfvrMfC
92+
dyowl8wOxpgd3EiUDDufncD7JmKBcyJRQOvTTGJz6T3cP8h9b65103faoyVRo0=
93+
cnds_ro_ac_secret: !encrypted/pkcs1-oaep
94+
- KvlXdw4RIkzHwaZPeeI+lhycJboSRBh7DJ/43Q0sNP9o1vkJG72pSv8w2HhycZU95SU6g
95+
k0B5uMwIHpXiQnmjgA4f8lLMkI6ppA5FLL5F3LwsVIlfUI1x8aM8Zl+LyVHSZJ/0kP3l7
96+
QTEJ6DDNVdI6xftCkKQiABUCMYwgbZsU3c3rJeF/RAuCUtrs/gRv+2F4/es7UWaafYvQa
97+
gqx4nC7LGn+7q1UH4BIbwVQdjH8f7H1SSEkz4t1goNqgVMqqv24hNF/KMRRGfZ/Zv9zPt
98+
B+uczjb4Jc6zwJL/zF+sZc1pIt9zn/RijJTYv0BX+ldfMiOflST/FlXcMZqULXHnyQLK/
99+
iqaJcTfI7fv1OCUtpNc0n6dJhK8piU//1JQ3Yanov0QTdEo4OTRxirGxIobzJfFl+hf+8
100+
D5b1ZKqkPhoTGP/vjl1XzvV2QuJ+ZX6P9GWKJr4r/9b2RuwywD71fUbXqmEva3/THY2Sg
101+
gY6QHocYpATL46iLkv97QANNUxTdxL7hQjdl/tf3TAHjCclmxdWhBJdvCJN/1xCM6EgVp
102+
NykBYxJ+kxSmkcFCSdUM8Td75bA/UzkPCdix1reJMdEAxTE9fC55XQ/liTLlGquQDnZty
103+
VLDH7x3ZJcxZsvqKR6vNbYYzJvDPTBYpHrhD7kx3ubyO9KX+SzZ+Dfhe9M8T8U=
82104
poc_wgcloud_ac_id: !encrypted/pkcs1-oaep
83105
- dQIs3NJt1CpP1925+b9QjjwonqjmiuCl1ewxw160yIEHQ/qyQiwutJbsg4IYS9XKhKc2X
84106
GumOOpLY7+/uNRR5pZmEfOdlGnPoJvVhYtCqHBFy7xQ6NLHKFxCT8zHM9ppSl1Hjc2G2F

Tests/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ scopes = [
1919
subjects = [
2020
"scs2",
2121
"artcodix",
22+
"artcodix-ro",
2223
# currently not reachable from outside: "cc-rrze",
2324
"pco-prod1",
2425
"pco-prod2",

Tests/iaas/openstack_test.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
from scs_0115_security_groups.security_groups import \
4141
compute_scs_0115_default_rules
4242
from scs_0116_key_manager.key_manager import \
43-
compute_services_lookup, compute_scs_0116_presence, compute_scs_0116_permissions
43+
ensure_unprivileged, compute_services_lookup, compute_scs_0116_presence, compute_scs_0116_permissions
4444
from scs_0117_volume_backup.volume_backup import \
4545
compute_scs_0117_test_backup
4646
from scs_0123_mandatory_services.mandatory_services import \
@@ -280,6 +280,20 @@ def harness(name, *check_fns):
280280
print(f"{name}: {result}")
281281

282282

283+
def run_sanity_checks(container):
284+
# make sure that we can connect to the cloud and that the user doesn't have elevated privileges
285+
# the former would lead to each testcase aborting with a marginally useful message;
286+
# the latter would lead to scs_0116_permissions aborting, which we don't want to single out
287+
try:
288+
conn = container.conn
289+
except openstack.exceptions.ConfigException:
290+
logger.critical("Please make sure that ~/.config/openstack/clouds.yaml exists and is correct!")
291+
raise
292+
if "member" not in ensure_unprivileged(conn, quiet=True):
293+
logger.critical("Please make sure that your OpenStack user has role member.")
294+
raise RuntimeError("OpenStack user is missing member role.")
295+
296+
283297
def main(argv):
284298
# configure logging, disable verbose library logging
285299
logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.DEBUG)
@@ -320,6 +334,7 @@ def main(argv):
320334
sys.exit(1)
321335

322336
c = make_container(cloud)
337+
run_sanity_checks(c)
323338
for testcase in testcases:
324339
testcase_name = testcase.rsplit('/', 1)[0] # see the note above
325340
harness(testcase_name, lambda: getattr(c, testcase.replace('-', '_').replace('/', '_')))

Tests/iaas/scs_0116_key_manager/key_manager.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
logger = logging.getLogger(__name__)
88

99

10-
def ensure_unprivileged(conn: openstack.connection.Connection) -> list:
10+
def ensure_unprivileged(conn: openstack.connection.Connection, quiet=False) -> list:
1111
"""
1212
Retrieves role names.
1313
Raises exception if elevated privileges (admin, manager) are present.
@@ -19,6 +19,8 @@ def ensure_unprivileged(conn: openstack.connection.Connection) -> list:
1919
role_names = set(conn.session.auth.get_access(conn.session).role_names)
2020
if role_names & {"admin", "manager"}:
2121
raise RuntimeError("user privileges too high: admin/manager roles detected")
22+
if quiet:
23+
return role_names
2224
if "reader" in role_names:
2325
logger.info("User has reader role.")
2426
custom_roles = sorted(role_names - {"reader", "member"})

compliance-monitor/bootstrap.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ accounts:
1919
delegates:
2020
- zuul_ci
2121
- subject: artcodix
22+
group: artcodix
23+
delegates:
24+
- zuul_ci
25+
- subject: artcodix-ro
26+
group: artcodix
2227
delegates:
2328
- zuul_ci
2429
- subject: cc-rrze

compliance-monitor/templates/overview.md.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Version numbers are suffixed by a symbol depending on state: * for _draft_, †
1919
| [CC@RRZE](https://www.rrze.fau.de/) | Private Compute Cloud (CC) for [FAU](https://www.fau.de/) | Regionales Rechenzentrum Erlangen |
2020
{#- #} [{{ results | pick(iaas, 'cc-rrze') | summary }}]({{ detail_url('cc-rrze', iaas) }}) {# -#}
2121
| (soon) |
22-
| [CNDS](https://cnds.io/) | Public cloud for customers | artcodix GmbH |
23-
{#- #} [{{ results | pick(iaas, 'artcodix') | summary }}]({{ detail_url('artcodix', iaas) }}) {# -#}
22+
| [CNDS](https://cnds.io/) | Public cloud for customers (2 regions) | artcodix GmbH |
23+
{#- #} [{{ results | pick(iaas, 'artcodix', 'artcodix-ro') | summary }}]({{ detail_url('group-artcodix', iaas) }}) {# -#}
2424
| [HM](https://ohm.muc.cloud.cnds.io/) |
2525
| [pluscloud open](https://www.plusserver.com/en/products/pluscloud-open) | Public cloud for customers (4 regions) | plusserver GmbH | {# #}
2626
{#- #}[{{ results | pick(iaas, 'pco-prod1', 'pco-prod2', 'pco-prod3', 'pco-prod4') | summary }}]({{ detail_url('group-pco-prod', iaas) }}) {# -#}

playbooks/clouds.yaml.j2

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,21 @@ clouds:
1313
interface: public
1414
identity_api_verion: 3
1515
auth_type: "v3applicationcredential"
16-
#region_name: "MUC"
16+
region_name: "MUC"
1717
auth:
1818
auth_url: https://api.dc1.muc.cloud.cnds.io:5000/
1919
application_credential_id: "{{ clouds_conf.cnds_ac_id }}"
2020
application_credential_secret: "{{ clouds_conf.cnds_ac_secret }}"
2121
#project_id: 225a7363dab74b69aa1e3f744aced109
22+
artcodix-ro:
23+
interface: public
24+
identity_api_verion: 3
25+
auth_type: "v3applicationcredential"
26+
region_name: "RO"
27+
auth:
28+
auth_url: https://api.dc1.ro.cloud.cnds.io:5000/
29+
application_credential_id: "{{ clouds_conf.cnds_ro_ac_id }}"
30+
application_credential_secret: "{{ clouds_conf.cnds_ro_ac_secret }}"
2231
cc-rrze:
2332
region_name: "DE-ERL"
2433
interface: "public"

0 commit comments

Comments
 (0)