Commit 86f34c6
159010: roachtest: randomize volume type and XFS r=nameisbhaskar,williamchoe3,herkolategan a=golgeek
Prior to this patch, tests had three possiblities for volume types:
1. Specify `PreferLocalSSD()` `DisableLocalSSD()` options.
2. Force a specific volume type via `VolumeType()` (volume type being provider specific, this was only possible for tests that target a single provider).
3. Rely on the default behavior for `PreferLocalSSD()` and use the default volume type in roachprod for the provider in case local SSD was not selected.
The way `PreferLocalSSD()` was implemented meant that most of the tests were actually running on local SSDs (when available on the machine type), leading to a gap in the testing strategy with regards to volume types.
This patch brings the new ClusterSpec option `RandomizeVolumeType()`. In case volume type is not forced and neither `PreferLocalSSD()` or `DisableLocalSSD()` are specified, specifying `RandomizeVolumeType()` will take precendence over the `--local-ssd` argument and will randomly select a volume type from those available in the targeted provider:
- AWS: gp3, io2, local SSD
- GCE: pd-ssd, local SSD
- Azure: premium-ssd, premium-ssd-v2, ultra-disk, local SSD
- IBM: 10iops-tier
Note: volume type randomization gives the same weight to all options.
This patch also introduces a random chance of provisioning XFS as a filesystem via the option `RandomlyUseXfs()`.
The option is built in the same way as `RandomlyUseZfs()`, granting a 20% chance of XFS if present.
If both `RandomlyUseZfs()` and `RandomlyUseXfs()` are used, they both get a 20% chance, leaving 60% chance for the default ext4.
All/most of the KV tests, and a few admission-control are switched to volume type/filesystem randomization as requested in [this issue](#146661).
Epic: none
Fixes: 146661
Release note: None
159787: oidcccl,provisioning: add user provisioning for OIDC authentication r=souravcrl a=souravcrl
Previously, the OIDC authentication flow in the DB Console only supported logging in with existing user accounts. There was no built-in mechanism to automatically create a new database user when a user authenticated via an OIDC provider for the first time.
This was inadequate because administrators would need to manually create a database user for every first‑time OIDC login, adding friction and overhead to onboarding.
To address this, this patch introduces automatic user provisioning for the OIDC authentication flow. When a new user successfully authenticates via an OIDC provider, a corresponding CockroachDB user is now automatically created if one does not already exist. This functionality is controlled by a new cluster setting, `security.provisioning.oidc.enabled`, which is disabled by default to maintain backward compatibility and ensure administrators can opt-in to this behavior.
Note: The `security.provisioning.oidc.enabled` cluster setting requires checking user existence before provisioning. This may introduce latency when concurrent OIDC authentication attempts from browsers generate high read request load on the user table.
Fixes: #126680
Epic: CRDB-48764
Release note (enterprise change): A new cluster setting, `security.provisioning.oidc.enabled`, has been added to allow for the automatic provisioning of users when they log in for the first time via OIDC. When enabled, a new user will be created in CockroachDB upon their first successful OIDC authentication. This feature is disabled by default.
On enabling the setting, user gets created on oidc login and can be validated using the `SHOW users` command.
```
> SELECT * FROM [SHOW USERS] WHERE username = 'testuser';
username | options | member_of | estimated_last_login_time
-----------------+-------------------------------------------------+-----------+----------------------------
testuser | {PROVISIONSRC=oidc:https://accounts.google.com} | {} | NULL
(1 row)
NOTICE: estimated_last_login_time is computed on a best effort basis; it is not guaranteed to capture every login event
```
Co-authored-by: Ludovic Leroux <ludo.leroux@cockroachlabs.com>
Co-authored-by: Shriram Ravindranathan <shriram.ravindranathan@cockroachlabs.com>
File tree
23 files changed
+1119
-81
lines changed- pkg
- ccl
- logictestccl/testdata/logic_test
- oidcccl
- cmd/roachtest
- spec
- tests
- roachprod/vm
- aws
- gce
- security/provisioning
23 files changed
+1119
-81
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| 163 | + | |
161 | 164 | | |
162 | 165 | | |
163 | 166 | | |
| |||
420 | 423 | | |
421 | 424 | | |
422 | 425 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
426 | 430 | | |
427 | 431 | | |
428 | 432 | | |
| |||
490 | 494 | | |
491 | 495 | | |
492 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
493 | 560 | | |
494 | 561 | | |
495 | 562 | | |
| |||
608 | 675 | | |
609 | 676 | | |
610 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
611 | 684 | | |
612 | 685 | | |
613 | 686 | | |
| |||
938 | 1011 | | |
939 | 1012 | | |
940 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
941 | 1017 | | |
942 | 1018 | | |
943 | 1019 | | |
| |||
0 commit comments