Skip to content

OpenShift auth handler for v2 docker registry #1472

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

Merged
merged 2 commits into from
Apr 8, 2015

Conversation

pravisankar
Copy link

No description provided.

}

// Status returns the HTTP Response Status Code for this authChallenge.
func (ac *authChallenge) Status() int {
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 remove this method and just return http.StatusUnauthorized directly in ServeHTTP

@pravisankar pravisankar changed the title [DO_NOT_MERGE] OpenShift auth handler for v2 docker registry OpenShift auth handler for v2 docker registry Apr 1, 2015
@pravisankar
Copy link
Author

@ncdc tested the code (docker push/pull is working as expected)
I'll update the test cases, please take a look

@pravisankar pravisankar force-pushed the v2registry-changes branch 2 times, most recently from 5bdf21d to a0deb83 Compare April 3, 2015 00:14
@pravisankar
Copy link
Author

@ncdc updated, please review

@ncdc
Copy link
Contributor

ncdc commented Apr 3, 2015

Looks like you might need to run gofmt on test/integration/v2_docker_registry_test.go, according to travis.


var _ registryauth.Challenge = &authChallenge{}

type OpenShiftAccess struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I like this being a struct. Could we remove it and modify VerifyOpenShiftAccess to take in the 4 fields as arguments instead?

@pravisankar
Copy link
Author

@ncdc updated as per your feedback, please review

},
}
for _, item := range table {
fmt.Println("Processing item: %s", item)
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't use println. t.Logf is ok

expectedError: nil,
},
}
for _, item := range table {
Copy link
Contributor

Choose a reason for hiding this comment

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

rename item to test

@pravisankar
Copy link
Author

@ncdc PTAL

@ncdc
Copy link
Contributor

ncdc commented Apr 8, 2015

[test]

Sent from my iPhone

On Apr 7, 2015, at 6:00 PM, Ravi Sankar Penta [email protected] wrote:

@ncdc PTAL


Reply to this email directly or view it on GitHub.

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1737/)

@ncdc
Copy link
Contributor

ncdc commented Apr 8, 2015

[test]

@ncdc
Copy link
Contributor

ncdc commented Apr 8, 2015

[test]

Sent from my iPhone

On Apr 8, 2015, at 7:05 AM, OpenShift Bot [email protected] wrote:

Evaluated for origin up to e384ee7


Reply to this email directly or view it on GitHub.

@ncdc
Copy link
Contributor

ncdc commented Apr 8, 2015

LGTM [merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1737/) (Image: devenv-fedora_1235)

@ncdc
Copy link
Contributor

ncdc commented Apr 8, 2015

exec flake, [merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin up to e384ee7

openshift-bot pushed a commit that referenced this pull request Apr 8, 2015
@openshift-bot openshift-bot merged commit 33f4e20 into openshift:master Apr 8, 2015
@brenton
Copy link
Contributor

brenton commented Apr 9, 2015

Is there a link to a story or a short description somewhere of what this PR enables? I'm guessing this will start enforcing who can push/pull images to the registry.

@brenton
Copy link
Contributor

brenton commented Apr 9, 2015

I see the policy is being updated to have a 'images' group.

@ncdc
Copy link
Contributor

ncdc commented Apr 9, 2015

@brenton the card is here: https://trello.com/c/IdJ6y0Wt/295-5-registry-authentication-authorization-imageregistry-codefreeze

A user will be able to push to an image repository in the OpenShift registry if they have edit or admin rights to a project. For pull, view/edit/admin rights.

Once Docker 1.6 is out and we've switching to using the v2 registry, we'll be securing access to /images and /imageStreamMappings so that only the v2 registry may access those routes. Users will be allowed to access /imageStreams, /imageStreamTags, and /imageStreamImages. See #1652

@brenton
Copy link
Contributor

brenton commented Apr 9, 2015

Thanks Andy. This is perfect.

jboyd01 pushed a commit to jboyd01/origin that referenced this pull request Nov 3, 2017
…service-catalog/' changes from 892b0368f0..3064247d05

3064247d05 origin build: add origin tooling
48ecff1 Chart changes for 0.1.2 (openshift#1527)
8727247 Fix change validator to look up serviceclass properly (openshift#1518)
b0b138b Broker Reconciliation occurs too frequently (openshift#1514)
cc816eb When a SI is unbindable, mark the binding request failed. (openshift#1522)
41290e9 Clarify semantics around RelistDuration (openshift#1516)
6bcb593 Send Context with UpdateInstanceRequest (openshift#1517)
c3b72d8 Enforce stricly increasing broker relistRequests (openshift#1515)
01d81e5 Follow up from openshift#1450 and openshift#1444 (openshift#1504)
5e77882 Retry failed deprovision requests (openshift#1505)
f6c891d Allow updates of instances that failed a previous update. (openshift#1502)
5107086 Use Plan ID from ExternalProperties when deprovisioning instance (openshift#1501)
d897c60 Adding message builder for expected event strings  (openshift#1465)
9f6152e update osb client and freeze gorilla context (openshift#1496)
c63277e Add unit tests verifying deleting a resource with an on-going operation or in orphan mitigation. (openshift#1490)
4ecca16 Pretty logging for controller_instance.go (openshift#1472)
c232db4 Register qemu statics when building non-amd64 images (openshift#1494)
0e54c57 fix 'Spring Cloud Services -> Configuring with Vault' link in docs (openshift#1495)
REVERT: 892b0368f0 origin build: add origin tooling

git-subtree-dir: cmd/service-catalog/go/src/github.com/kubernetes-incubator/service-catalog
git-subtree-split: 3064247d0544aa43f976d93caea0a11771434ef7
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Feb 1, 2018
* Working on controller instance.

* Finished working controller_instance.go.
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