Skip to content

Conversation

@hoxhaeris
Copy link
Contributor

@openshift-ci openshift-ci bot requested review from bradmwilliams and jupierce July 31, 2025 14:46
@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 31, 2025
@bradmwilliams
Copy link
Contributor

/retest-required

@hoxhaeris
Copy link
Contributor Author

/retest

@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch 2 times, most recently from 7515bb3 to 0847735 Compare August 13, 2025 20:14
@bradmwilliams
Copy link
Contributor

/label tide/merge-method-squash

@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Aug 28, 2025
@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch from 98956a7 to 01f559a Compare August 29, 2025 09:52
@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch 2 times, most recently from 048be25 to 5ac51f6 Compare September 30, 2025 08:30
@hoxhaeris hoxhaeris changed the title [WIP] Cluster bot org auth Cluster bot org auth Sep 30, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 30, 2025
@hoxhaeris
Copy link
Contributor Author

/hold
We need to set up the cron job generating the org dump first.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 30, 2025
@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch from 5ac51f6 to 516fd35 Compare September 30, 2025 10:03
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2025
Makefile Outdated
Comment on lines 12 to 13
# Use standard GO_BUILD_FLAGS for build tags (e.g., -tags gcs)
GO_BUILD_FLAGS ?=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After our standup, I took a look at this again and I think that you should probably just change this line to:
GO_BUILD_FLAGS=-tags gcs -trimpath

The current issue is that GO_BUILD_FLAGS is imported directly from build-machinery and using ?= doesn't work unless passed in on the command line. That's silly when we can force the issue ourselves and then we won't have to make any changes to openshift/release.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each of us will have to update our IDE specific builds to add the tags accordingly, but for production we always produce the GCS version.

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Oct 9, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hoxhaeris

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch from 516fd35 to 41c9a9f Compare November 21, 2025 08:52
@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch from 41c9a9f to 11c3508 Compare November 21, 2025 09:30
…ands

Extend authorization coverage to all commands that create or delete
resources. Previously only launch, rosa create, workflow-launch, and
mce create were protected.

Commands now protected with authorization:
- done: Deletes user's cluster resources
- test upgrade: Creates test job resources
- test: Creates test job resources
- build: Creates build job resources
- workflow-test: Creates test job resources
- workflow-upgrade: Creates upgrade job resources
- catalog build: Creates catalog build job resources
- mce delete: Deletes MCE cluster resources

Read-only commands remain unprotected:
- list, auth, lookup, version, whoami (query only)
- rosa lookup, rosa describe (query only)
- mce auth, mce list, mce lookup (query only)
- refresh (retries credentials fetch for existing cluster)
@hoxhaeris hoxhaeris force-pushed the cluster_bot_org_auth_poc branch from a723403 to 1e33ee3 Compare November 21, 2025 11:47
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 21, 2025

@hoxhaeris: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/security f8a2142 link false /test security
ci/prow/govulncheck f8a2142 link false /test govulncheck

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Comment on lines +100 to +102
gcsBucket string
gcsObjectPath string
gcsProjectID string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add default values for these, since we know that they won't be changing. That way it keeps the command line from getting any more unwieldy.

gcsObjectPath string
gcsProjectID string
gcsCredentialsJSON string
gcsCheckInterval time.Duration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default value

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment was specifically for the gcsCheckInterval variable

Comment on lines +416 to +438
if err := orgdata.SetupGCSDataSource(ctx, gcsConfig, orgDataService); err != nil {
klog.Warningf("GCS setup failed: %v. Running without authorization data (permit all mode)", err)
orgDataService = nil // Clear the service since we couldn't load any data
}

// Initialize authorization service if config is provided
if opt.authorizationConfigPath != "" {
klog.Infof("Initializing authorization service with config: %s", opt.authorizationConfigPath)
authService = orgdata.NewAuthorizationService(orgDataService, opt.authorizationConfigPath)
if err := authService.LoadConfig(ctx); err != nil {
klog.Warningf("Failed to load authorization config: %v", err)
// Keep the authService even if config fails to load - it will allow all commands
} else {
klog.Infof("Authorization service successfully initialized with config: %s", opt.authorizationConfigPath)
}

// Start config watcher regardless of initial load success - it will detect file creation
go func() {
if err := authService.StartConfigWatcher(ctx); err != nil {
klog.Infof("Authorization config watcher stopped: %v", err)
}
}()
} else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is no orgDataService, why bother setting up the authService at all?

@@ -0,0 +1,103 @@
# Authorization configuration for ci-chat-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make sure that this is referenced as an "Example" or "Sample" file and not the real configuration (to avoid any confusion)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants