-
Notifications
You must be signed in to change notification settings - Fork 86
Updated commit hash in ceph tests #9152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,14 @@ ssl_verify = False | |
## the prefix to 30 characters long, and avoid collisions | ||
bucket prefix = ceph-{random}- | ||
|
||
# all the iam account resources (users, roles, etc) created | ||
# will start with this name prefix | ||
iam name prefix = s3-tests- | ||
|
||
# all the iam account resources (users, roles, etc) created | ||
# will start with this path prefix | ||
iam path prefix = /s3-tests/ | ||
|
||
[s3 main] | ||
## the tests assume two accounts are defined, "main" and "alt". | ||
email = main.alt@noobaa.com | ||
|
@@ -51,9 +59,50 @@ secret_key = tenant_secret_key | |
# tenant email set in vstart.sh | ||
email = ceph.tenant@noobaa.com | ||
|
||
# tenant name | ||
tenant = testx | ||
|
||
[s3 alt] | ||
## another user account, used for ACL-related tests | ||
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234 | ||
display_name = cephalt | ||
## the "alt" user needs to have email set, too | ||
email = ceph.alt@noobaa.com | ||
## replace these with your access keys | ||
access_key = s3_access_key | ||
secret_key = s3_secret_key | ||
|
||
### Currently we are not supporting iam account tests, so we are adding the dummy values below as it is required by the test framework | ||
### This is a temporary fix and will be removed once we support iam account tests | ||
|
||
#following section needs to be added for all sts-tests | ||
[iam] | ||
#used for iam operations in sts-tests | ||
#email from vstart.sh | ||
email = ceph.alt@noobaa.com | ||
|
||
#user_id from vstart.sh | ||
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234 | ||
|
||
#access_key from vstart.sh | ||
access_key = tenant_access_key | ||
|
||
#secret_key vstart.sh | ||
secret_key = tenant_secret_key | ||
|
||
#display_name from vstart.sh | ||
display_name = cephalt | ||
|
||
Comment on lines
+78
to
+95
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainVerify IAM section credentials don't conflict with other sections. The 🏁 Script executed: #!/bin/bash
# Description: Analyze credential and identifier reuse across config sections
# Expected: Should identify potential conflicts in email, user_id, and key placeholders
echo "Checking tenant_access_key usage across sections:"
rg -A 1 -B 1 "tenant_access_key" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf
echo -e "\nChecking email address reuse:"
rg -A 1 -B 1 "ceph\.alt@noobaa\.com" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf
echo -e "\nChecking user_id reuse:"
rg -A 1 -B 1 "56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234" src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf Length of output: 1542 Avoid Shared Credentials Across Sections Multiple sections in • Access keys: Please assign unique placeholder values (or parameterize these via your test harness) so that each test section operates with its own credentials and avoids collisions. 🤖 Prompt for AI Agents
|
||
# iam account root user for iam_account tests | ||
[iam root] | ||
access_key = tenant_access_key | ||
secret_key = tenant_secret_key | ||
user_id = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | ||
email = main.alt@noobaa.com | ||
|
||
# iam account root user in a different account than [iam root] | ||
[iam alt root] | ||
access_key = tenant_access_key | ||
secret_key = tenant_secret_key | ||
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234 | ||
email = ceph.alt@noobaa.com | ||
Comment on lines
+96
to
+108
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Review root IAM account configuration for consistency. Both Consider using distinct placeholder names for different root accounts to ensure they receive different credentials: # iam account root user for iam_account tests
[iam root]
-access_key = tenant_access_key
-secret_key = tenant_secret_key
+access_key = iam_root_access_key
+secret_key = iam_root_secret_key
user_id = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
email = main.alt@noobaa.com
# iam account root user in a different account than [iam root]
[iam alt root]
-access_key = tenant_access_key
-secret_key = tenant_secret_key
+access_key = iam_alt_root_access_key
+secret_key = iam_alt_root_secret_key
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
email = ceph.alt@noobaa.com This would require updating the setup script to handle these new placeholders appropriately.
🤖 Prompt for AI Agents
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify placeholder substitution doesn't conflict with main section.
The
s3_access_key
ands3_secret_key
placeholders are also used in the[s3 main]
section. Ensure the setup script correctly handles these duplicate placeholders and assigns appropriate values to each section.🏁 Script executed:
Length of output: 1130
🏁 Script executed:
Length of output: 5133
Ensure distinct placeholders for tenant credentials in the alt section
The setup script only replaces
s3_access_key
/s3_secret_key
once, so both your main and alt sections end up using the same S3 account keys. To correctly assign tenant credentials, use separate placeholders in the[s3 alt]
section or update the script:• File: src/test/external_tests/ceph_s3_tests/test_ceph_s3_config.conf
[s3 alt]
section, change:## replace these with your access keys
-access_key = s3_access_key
-secret_key = s3_secret_key
+access_key = tenant_access_key
+secret_key = tenant_secret_key
```
• File: src/test/external_tests/ceph_s3_tests/test_ceph_s3_config_setup.js
tenant_access_key
/tenant_secret_key
with the tenant’s keys (as it does) and that it still replacess3_access_key
/s3_secret_key
for the primary account.This change will ensure the alt tests receive the tenant’s credentials rather than the main S3 account’s.
📝 Committable suggestion
🤖 Prompt for AI Agents