Bug 1535026

Summary: Document configuring auth_type for ISV Registry with OAB
Product: OpenShift Container Platform Reporter: Dylan Murray <dymurray>
Component: DocumentationAssignee: Alex Dellapenta <adellape>
Status: CLOSED CURRENTRELEASE QA Contact: Jian Zhang <jiazha>
Severity: unspecified Docs Contact: Vikram Goyal <vigoyal>
Priority: unspecified    
Version: 3.7.0CC: adellape, aos-bugs, chezhang, jiazha, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.7.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: qe_review
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-09 16:59:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1539310    
Bug Blocks:    

Description Dylan Murray 2018-01-16 13:49:38 UTC
Document URL: https://docs.openshift.com/container-platform/3.7/install_config/install/advanced_install.html#configuring-openshift-ansible-broker

Section Number and Name: 
Configuring the OpenShift Ansible Broker

Describe the issue: 
When using the `openshift` registry (ISV registry at registry.connect.redhat.com https://github.com/openshift/ansible-service-broker/blob/master/docs/config.md#openshift-registry) we must be setting the value `auth_type`. We can either set that value to be a secret/file (https://github.com/openshift/ansible-service-broker/blob/master/docs/config.md#storing-registry-credentials-in-a-secretfile) or we can set the value to be `config` and simply declare user/pass in the configuration itself.

In OCP 3.7 if `auth_type` is NOT set then the Broker will completely ignore credentials even if they are stored in the configmap. I recommend the user sets this to config and declares them in the configmap unless they do not want their credentials publicly accessible. In this case they should use a secret.

Comment 2 Zhang Cheng 2018-01-27 14:38:22 UTC
Please help to define the "Target Release". Thx.

Comment 3 Jian Zhang 2018-01-29 03:00:58 UTC
Alex,

Thanks for your update! But, for the "Storing Registry Credentials" subsection, we have a bug about the "file" auth type. Here: https://bugzilla.redhat.com/show_bug.cgi?id=1539310.
Another problem, I think we should replace the "registry.access.redhat.com" with "https://registry.connect.redhat.com" in that doc description. Because users do NOT need to config the user/pass to access the "registry.access.redhat.com" registry.

The other two docs look good to me.

Comment 4 Alex Dellapenta 2018-01-29 18:47:56 UTC
Jian,

Thank you! Updates made per your feedback, see:

https://github.com/openshift/openshift-docs/pull/6755#issuecomment-361344953

Comment 5 Jian Zhang 2018-01-31 06:14:26 UTC
Alex,

Thanks for your update! From this PR info, I think it will be released in version 3.9, right? If yes, I think we should add the "Target Release" info for this bug.
And, for 3.9 scenarios, I added some comments in your PR. I changed status to ASSIGNED since need updating.

Comment 6 Alex Dellapenta 2018-01-31 20:23:02 UTC
I've set this BZ to target release 3.7.z, and I'll make a separate PR for tracking the fix into 3.9 docs.

Comment 7 Jian Zhang 2018-02-01 03:13:02 UTC
Alex,

Thanks! Actually, for version 3.7, we just need to point out the "auth_type: config" is a necessary. And, where is your PR of the 3.7 docs? 
The https://github.com/openshift/openshift-docs/pull/6755#issuecomment-361344953 is 3.9 docs, right? I see the PR merge request to the master branch.

Comment 8 Alex Dellapenta 2018-02-02 21:29:56 UTC
Jian, see latest comments in https://github.com/openshift/openshift-docs/pull/6755#issuecomment-362708805.

Comment 9 Jian Zhang 2018-02-05 01:33:47 UTC
Alex,

Thanks for your update! I added some comments to it, change status to ASSIGNED since need updating.

Comment 10 Alex Dellapenta 2018-02-05 18:10:54 UTC
Thank you again, PR updated:

https://github.com/openshift/openshift-docs/pull/6755#issuecomment-363148584

Comment 11 Jian Zhang 2018-02-06 02:05:11 UTC
Alex,

Thanks! For "Storing Registry Credentials" section, it looks good to me. But, for "ISV Registry", I found the registry name was NOT updated per my comments. I think we should update the name in order to avoid confusion.

Comment 12 Alex Dellapenta 2018-02-06 20:50:43 UTC
Sorry, I don't know how that kept getting missed. Fixed via https://github.com/openshift/openshift-docs/pull/7611.

Comment 14 Jian Zhang 2018-02-08 01:26:10 UTC
Alex,

For 3.9 version, we have removed the "config" type. It means the below configs will work. So, I think we can remove the "config" type instructions in 3.9 version.

registry:
  ...
  - type: openshift
    name: isv
    url: https://registry.connect.redhat.com
    user: xxx
    pass: xxx
    images:
      - rocketchat/rocketchat-apb
    white_list:
      - ".*-apb$"

Comment 16 Jian Zhang 2018-02-14 02:46:24 UTC
Alex, 

Thanks for your update! There are still two places need to be updated.

1)For the secret type, the users also need to specify the namespace, like below:

registry:
  - name: isv
    type: openshift
    url: https://registry.connect.redhat.com
    auth_type: secret
    auth_name: registry-credentials-secret
...
openshift:
  namespace: openshift-ansible-service-broker
  ...

2)For the file type, the containers.volumeMounts section, its format should be:

volumeMounts:
  - mountPath: /tmp/registry-credentials
    name: reg-auth

Comment 17 Alex Dellapenta 2018-02-14 21:24:23 UTC
Thanks, updates made.

Comment 18 Jian Zhang 2018-02-15 01:44:23 UTC
Alex,

Thanks for your update! It looks good to me!

Comment 19 openshift-github-bot 2018-04-03 13:39:11 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/0feb7347e450836423a0cae6eea12810f00fef4e
Merge pull request #7984 from adellape/origin_oab_prefix

Bug 1535026: Fix OAB prefix/registry for Origin