Skip to content

Conversation

@deads2k
Copy link
Contributor

@deads2k deads2k commented Mar 19, 2015

This adds a fine-grained policy rule that checks to see if a subject access review request is for "self". If it is, then the additional check allows it.

@liggitt It fell out pretty clean. Almost exactly as planned, except for needing to parse the content.

Copy link
Contributor

Choose a reason for hiding this comment

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

if we don't have attribute restrictions, we can return true
if we do have attribute restrictions, and they aren't a recognized type, we should return false (or an error)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was bad. Fixed and a test added.

@deads2k deads2k force-pushed the deads-create-fine-grained-subjectaccessreview branch from fef5c79 to f52461e Compare March 20, 2015 18:30
@deads2k
Copy link
Contributor Author

deads2k commented Mar 20, 2015

rebased.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think IsPersonalSubjectAccessReview is a better name for the restriction marker type itself

@liggitt
Copy link
Contributor

liggitt commented Mar 21, 2015

nit about the marker type name and squash, then LGTM

@deads2k
Copy link
Contributor Author

deads2k commented Mar 21, 2015

Reminder to myself to update the serialization to omitempty

@deads2k deads2k force-pushed the deads-create-fine-grained-subjectaccessreview branch from f52461e to a7959e6 Compare March 23, 2015 12:50
@deads2k deads2k force-pushed the deads-create-fine-grained-subjectaccessreview branch from a7959e6 to 8e71ce9 Compare March 23, 2015 12:51
@deads2k
Copy link
Contributor Author

deads2k commented Mar 23, 2015

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/1257/) (Image: devenv-fedora_1106)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 8e71ce9

openshift-bot pushed a commit that referenced this pull request Mar 23, 2015
@openshift-bot openshift-bot merged commit d4dfb69 into openshift:master Mar 23, 2015
@deads2k deads2k deleted the deads-create-fine-grained-subjectaccessreview branch March 23, 2015 13:59
@deads2k
Copy link
Contributor Author

deads2k commented Mar 23, 2015

@pravisankar This should fix your problem with personal subject access reviews from the docker registry. Remember you'll need to delete the contents of your etcd to get the new default policy.

@smarterclayton
Copy link
Contributor

This doesn't work anymore. I'm going to have to rip this and replace it with standard objects. You can't put interfaces into our objects right now.

@liggitt
Copy link
Contributor

liggitt commented May 4, 2015

That shouldn't be using anything unusual. What wasn't working?

@smarterclayton
Copy link
Contributor

runtime.EmbeddedObject{} has a runtime.Object in its internal version, which means its an interface, which means gob.Encode/Decode (used by conversion.DeepCopy) can't round trip it.

We didn't really need EmbeddedObject here - because we can just define things by type.

@liggitt
Copy link
Contributor

liggitt commented May 4, 2015

Hmm, didn't that break other things that used runtime.EmbeddedObject?

@smarterclayton
Copy link
Contributor

Nothing else uses EmbeddedObject

----- Original Message -----

Hmm, didn't that break other things that used runtime.EmbeddedObject?


Reply to this email directly or view it on GitHub:
#1392 (comment)

@liggitt
Copy link
Contributor

liggitt commented May 4, 2015

@deads2k awesome… apparently we were the only ones using this. Trouble for config as well?

@smarterclayton
Copy link
Contributor

We were using this in config???

----- Original Message -----

@deads2k awesome… apparently we were the only ones using this. Trouble for
config as well?


Reply to this email directly or view it on GitHub:
#1392 (comment)

@liggitt
Copy link
Contributor

liggitt commented May 4, 2015

EmbeddedObject, yes

@smarterclayton
Copy link
Contributor

We should probably not.

On May 4, 2015, at 7:17 PM, Jordan Liggitt [email protected] wrote:

EmbeddedObject, yes


Reply to this email directly or view it on GitHub.

@deads2k
Copy link
Contributor Author

deads2k commented May 5, 2015

We didn't really need EmbeddedObject here - because we can just define things by type

What do you mean by, "define things by type"? There are other rules we want to write in code, things like kubelet rules. I'd rather not list every possibility as a pointer and name them all. You can also see the usage inside of the kubeconfig objects. That is the point where openshift can extend a kubeconfig file in an easy way. We also make use of these in the openshift start config objects for dealing with places where are there are many potentially valid types. Rather than trying to enforce "at most one" logic on a set of pointers.

I'd rather not end up trying to enforce a type that looks like this: https://github.com/openshift/origin/blob/master/pkg/build/api/types.go#L107. Adding anything other than git there is going to start looking crazy with partially completed objects. It'll start to look like this: https://github.com/openshift/origin/blob/master/pkg/build/api/types.go#L154 only a lot worse.

@smarterclayton
Copy link
Contributor

On May 5, 2015, at 7:38 AM, David Eads [email protected] wrote:

We didn't really need EmbeddedObject here - because we can just define things by type

What do you mean by, "define things by type"? There are other rules we want to write in code, things like kubelet rules. I'd rather not list every possibility as a pointer and name them all.

If you have less than X where X is reasonably small the switch is easier to document and use as a client. Large X is where the unknown object becomes useful. Will sync with you in person and we can close this.
You can also see the usage inside of the kubeconfig objects. That is the point where openshift can extend a kubeconfig file in an easy way. We also make use of these in the openshift start config objects for dealing with places where are there are many potentially valid types. Rather than trying to enforce "at most one" logic on a set of pointers.

I'd rather not end up trying to enforce a type that looks like this: https://github.com/openshift/origin/blob/master/pkg/build/api/types.go#L107. Adding anything other than git there is going to start looking crazy with partially completed objects. It'll start to look like this: https://github.com/openshift/origin/blob/master/pkg/build/api/types.go#L154 only a lot worse.


Reply to this email directly or view it on GitHub.

jboyd01 pushed a commit to jboyd01/origin that referenced this pull request Oct 17, 2017
…service-catalog/' changes from 3aacfedec6..aa27078754

aa27078754 origin build: add origin tooling
bcf37fd 0.1.0-rc2 chart updates (openshift#1410)
4ab0a0a add back 'Processing' message for instance deletion (openshift#1332)
0ecbcb1 Update logs for Cluster service plans. (openshift#1389)
8b491ef Fix a quoting nit (openshift#1400)
63685e4 add orphan mitigation-specific conditions for instances (openshift#1378)
adee662 Updated missed fields in service and plan specs (openshift#1406)
2095919 Handle default plan setting when using k8s names (openshift#1405)
607ba66 Document rbacEnable. (openshift#1404)
268294e Adding rbac definition for v1 api endpoint. (openshift#1284)
103288d differentiate between failed updates and provisions during deletion (openshift#1383)
eba8ba4 enable API aggregation and Service Catalog RBAC on Jenkins (openshift#1333)
5a93315 Validate relistDuration is non-negative (openshift#1395)
e279d21 Fix log messages for secrets (openshift#1385)
87fa8c9 fix status update when starting orphan mitigation (openshift#1372)
11f18f3 Switch to wget for integration apiserver checks (openshift#1384)
8c44a7d update OSB client to 2.13 (openshift#1392)
e64bbd1 default plan admission controller: filter list of service plans/service classes by the class name (openshift#1351)
6648c0e Check field names. Fix issue 1291 (openshift#1379)
5319841 update comment for instance generation check (openshift#1382)
7d5823f remove internal poll method (openshift#1381)
07d3068 Rework the logging for controller_instance. (openshift#1371)
5f4ca01 address PR comment as a followup (openshift#1380)
485d5e6 Add support for specifying plan using K8S names. (openshift#1377)
662bba8 Log number of secret keys created for binding credential (openshift#1375)
8ad6a31 Move controller constants into correct files (openshift#1373)
7bd66dd Adding type to log. (openshift#1339)
1ce5c4d Remove k8s/k8s dependency (openshift#1355)
b458323 Adding log formatting for BindingController. (openshift#1352)
275eb11 rename test variables to be consistent (openshift#1315)
ffd6b8b travis: skip cleanup before deploy (openshift#1368)
d5ecc04 fix travis tag checker (openshift#1365)
2cae0ee Minor updates to README (openshift#1360)
REVERT: 3aacfedec6 carry: Set external plan name for service-catalog walkthrough
REVERT: 3ec9e5b07a origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: aa2707875461dd51be3731b1d94b5cfc3b9a3976
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Feb 1, 2018
* change alpha resources to non-alpha versions

* update OSB client to 2.13
sttts pushed a commit to sttts/origin that referenced this pull request Aug 26, 2019
Restore OCP branding to error, login, and selectprovider pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants