Skip to content
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

ceph: add opa config options to ObjectStoreSpec #8731

Closed
wants to merge 1 commit into from

Conversation

thotz
Copy link
Contributor

@thotz thotz commented Sep 16, 2021

Description of your changes:
This PR adds the options in ObjectStore CRD for configuring OPA
authentication with RGW.

Resolves #8737
Signed-off-by: Jiffin Tony Thottan thottanjiffin@gmail.com

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

@mergify mergify bot added the ceph main ceph tag label Sep 16, 2021
This PR adds the options in ObjectStore CRD for configuring OPA
authentication with RGW.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
@BlaineEXE
Copy link
Member

@thotz Is this related to a BZ or feature request?

@travisn
Copy link
Member

travisn commented Sep 16, 2021

@thotz Is this related to a BZ or feature request?

Yes it would be helpful just to have more background on requirements for new features, thanks.

@thotz
Copy link
Contributor Author

thotz commented Sep 17, 2021

@thotz Is this related to a BZ or feature request?

Yes it would be helpful just to have more background on requirements for new features, thanks.

The request was from openshift OPA team via mail, So I created Rook Issue #8737 and mentioned it in the Commit message of this PR

// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:Required
// +required
URL string `json:"url,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
URL string `json:"url,omitempty"`
URL string `json:"url"`

Since this is required.

// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:Required
// +required
Token string `json:"token,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Token string `json:"token,omitempty"`
Token string `json:"token"`

@@ -210,6 +210,19 @@ func TestSSLPodSpec(t *testing.T) {
s, err = c.makeRGWPodSpec(rgwConfig)
assert.NoError(t, err)
podTemplate = cephtest.NewPodTemplateSpecTester(t, &s)
podTemplate.RunFullSuite(cephconfig.RgwType, "default", "rook-ceph-rgw", "mycluster", "quay.io/ceph/ceph:myversion",
Copy link
Member

Choose a reason for hiding this comment

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

What is this actually testing?

if c.store.Spec.Security.OpenPolicyAgentService.VerifySSL != nil {
container.Args = append(container.Args,
cephconfig.NewFlag("rgw opa verify ssl",
strconv.FormatBool(*c.store.Spec.Security.OpenPolicyAgentService.VerifySSL)))
Copy link
Member

Choose a reason for hiding this comment

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

Is the bool pointer really necessary? If it's not required why not just let the default. false?

@BlaineEXE
Copy link
Member

@thotz Is this related to a BZ or feature request?

Yes it would be helpful just to have more background on requirements for new features, thanks.

The request was from openshift OPA team via mail, So I created Rook Issue #8737 and mentioned it in the Commit message of this PR

We need to know how to prioritize incoming feature requests. A new Rook issue is good, but let's get a BZ (or Jira?) against OCS/ODF that PM can prioritize. Since this is a cross-team request, we have to have an understanding of who needs it, when they need it, and why they need it. We cannot guarantee that Rook upstream can spend time on under-the-table requests like this.

@thotz
Copy link
Contributor Author

thotz commented Sep 20, 2021

@thotz Is this related to a BZ or feature request?

Yes it would be helpful just to have more background on requirements for new features, thanks.

The request was from openshift OPA team via mail, So I created Rook Issue #8737 and mentioned it in the Commit message of this PR

We need to know how to prioritize incoming feature requests. A new Rook issue is good, but let's get a BZ (or Jira?) against OCS/ODF that PM can prioritize. Since this is a cross-team request, we have to have an understanding of who needs it, when they need it, and why they need it. We cannot guarantee that Rook upstream can spend time on under-the-table requests like this.

I have opened a Jira ticket https://issues.redhat.com/browse/RGW-173 in the RGW kanban board as beginning, try to involve more people to get more understanding about the plan on the ticket

Copy link
Member

@leseb leseb left a comment

Choose a reason for hiding this comment

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

Also see my comment about having a new entry like IdentityManagement to have OPA and LDAP under it

@@ -199,6 +201,15 @@ $ vault write -f transit/keys/<mybucketkey> exportable=true # transit engine

* TLS authentication with custom certs between Vault and RGW are yet to be supported.

Here example for OPA config:
```yaml
opa:
Copy link
Member

Choose a reason for hiding this comment

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

Let's avoid non-obvious acronyms in the CR property names

Suggested change
opa:
openPolicyAgent:

token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
verifySSL: true
```
The config options include url, token for the OPA service. The TLS certs can be passed with help `caBundleRef`. For more details w.r.t RGW, please refer [Ceph OPA documentation](https://docs.ceph.com/en/latest/radosgw/opa/).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The config options include url, token for the OPA service. The TLS certs can be passed with help `caBundleRef`. For more details w.r.t RGW, please refer [Ceph OPA documentation](https://docs.ceph.com/en/latest/radosgw/opa/).
The config options include url, token for the OPA service. The TLS certs can be passed with help `caBundleRef`. For more details, please refer to the [Ceph OPA documentation](https://docs.ceph.com/en/latest/radosgw/opa/).

// Indicate whether the server certificate is validated by the client or not
// +optional
// +nullable
VerifySSL *bool `json:"verifySSL,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

Is the behavior of "not set" and "false" the same? If so, how about removing the pointer for simplicity?

Suggested change
VerifySSL *bool `json:"verifySSL,omitempty"`
VerifySSL bool `json:"verifySSL,omitempty"`

// +optional
// +nullable
VerifySSL *bool `json:"verifySSL,omitempty"`
// Token is the token for the OPA
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Token is the token for the OPA
// Token for the OPA

@BlaineEXE
Copy link
Member

I think #8579 is the more high priority item that we definitely have in our requirements for ODF 4.10. Let's focus on that PR first.

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Labeled by the stale bot label Oct 24, 2021
@thotz thotz added keepalive and removed stale Labeled by the stale bot labels Oct 25, 2021
@mergify
Copy link

mergify bot commented Oct 28, 2021

This pull request has merge conflicts that must be resolved before it can be merged. @thotz please rebase it. https://rook.io/docs/rook/latest/development-flow.html#updating-your-fork

@thotz thotz mentioned this pull request Apr 4, 2022
10 tasks
@thotz
Copy link
Contributor Author

thotz commented Jun 24, 2022

I am closing this PR since there is no more interest wrt to this feature atm, not planning to work on it anytime soon. I will open once again when priority changes

1 similar comment
@thotz
Copy link
Contributor Author

thotz commented Jun 24, 2022

I am closing this PR since there is no more interest wrt to this feature atm, not planning to work on it anytime soon. I will open once again when priority changes

@thotz thotz closed this Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ceph main ceph tag keepalive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ceph/rgw: add config options for OPA in CephObjectStore CRD
4 participants