Bug 1387509 - [Doc RFE] Document how to set security access for a volume.
Summary: [Doc RFE] Document how to set security access for a volume.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: doc-Container_Native_Storage_with_OpenShift
Version: cns-3.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: CNS 3.4
Assignee: Bhavana
QA Contact: krishnaram Karthick
URL:
Whiteboard:
Depends On:
Blocks: 1385252
TreeView+ depends on / blocked
 
Reported: 2016-10-21 07:01 UTC by Anjana Suparna Sriram
Modified: 2017-01-23 07:22 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-23 07:22:49 UTC
Target Upstream Version:
hchiramm: needinfo-
hchiramm: needinfo-


Attachments (Terms of Use)

Description Anjana Suparna Sriram 2016-10-21 07:01:05 UTC
Additional info: This bug tracks the following use case as per the CNS 3.4 Content Plan: https://docs.google.com/document/d/1SrbUxavmmdbLn7FT2nhOAlX0Q3VTsqPCZyx6wV3gjn0/edit#


Use Case #1 - As an end user, I want to set the security access to my volumes.

Document concept and task information regarding how to set the Kubernetes’ securityContext option for all the containers within the OCP pod.

Comment 4 khartsoe@redhat.com 2016-10-27 20:09:24 UTC
Hi Bhavana...per feedback from Luis:
This will mostly be handled by dynamic provisioning.  Humble is your main contact.  Once a group id has been set for the volume, then the instructions on Section 19.3.4.1 in [1] can be followed to setup the application.

[1] https://access.redhat.com/documentation/en/openshift-container-platform/3.3/paged/installation-and-configuration/chapter-19-configuring-persistent-storage#install-config-persistent-storage-persistent-storage-glusterfs

Also, please include Erin Boyd in any review of the content. Thanks.

Comment 8 Bhavana 2016-11-14 07:19:50 UTC
Hi Humble,

Following is the updated link shared by Anjana:

https://access.redhat.com/documentation/en/openshift-container-platform/3.3/single/installation-and-configuration/#complete-example-using-gusterfs-defining-glusterfs-volume-access

Let me know if I can use it in the guide.

Comment 9 Humble Chirammal 2016-11-14 13:28:00 UTC
(In reply to Bhavana from comment #8)
> Hi Humble,
> 
> Following is the updated link shared by Anjana:
> 
> https://access.redhat.com/documentation/en/openshift-container-platform/3.3/
> single/installation-and-configuration/#complete-example-using-gusterfs-
> defining-glusterfs-volume-access
> 
> Let me know if I can use it in the guide.

LGTM.

Comment 10 Bhavana 2016-11-17 04:28:39 UTC
Hi Humble,

Here is the updated link with the details regarding volume security for statically provisioned volumes:

http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-branch-dynamic_provisioning_volume_security/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html#idm140189474689728

I would like to understand if we are going ahead with "Volume Security for Dynamically Provisioned Volumes" or not.

Based on that I can either move the bug on_qa or wait for more details wrt dynamically provisioned volumes.

Thanks.

Comment 11 Humble Chirammal 2016-12-05 13:37:39 UTC
(In reply to Bhavana from comment #10)
> Hi Humble,
> 
> Here is the updated link with the details regarding volume security for
> statically provisioned volumes:
> 
> http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> branch-dynamic_provisioning_volume_security/lastSuccessfulBuild/artifact/tmp/
> en-US/html-single/index.html#idm140189474689728
> 
> I would like to understand if we are going ahead with "Volume Security for
> Dynamically Provisioned Volumes" or not.
> 
> Based on that I can either move the bug on_qa or wait for more details wrt
> dynamically provisioned volumes.
> 
> Thanks.

We will have this feature in CNS 3.4. Lets work on the documentation.

Comment 12 Bhavana 2016-12-12 07:18:23 UTC
(In reply to Humble Chirammal from comment #11)
> (In reply to Bhavana from comment #10)
> > Hi Humble,
> > 
> > Here is the updated link with the details regarding volume security for
> > statically provisioned volumes:
> > 
> > http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-
> > Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-
> > branch-dynamic_provisioning_volume_security/lastSuccessfulBuild/artifact/tmp/
> > en-US/html-single/index.html#idm140189474689728
> > 
> > I would like to understand if we are going ahead with "Volume Security for
> > Dynamically Provisioned Volumes" or not.
> > 
> > Based on that I can either move the bug on_qa or wait for more details wrt
> > dynamically provisioned volumes.
> > 
> > Thanks.
> 
> We will have this feature in CNS 3.4. Lets work on the documentation.

Sure Humble,

Can you please share the steps to set up Volume Security for Dynamically Provisioned Volumes

Thanks

Comment 13 Humble Chirammal 2016-12-12 13:19:51 UTC
The dynamic provisioner introduced 2 more new parameters called gidMin and gidMax which allows the admin to configure GID range for the storage class.

For ex:

gidMin: "2000"
gidMax: "4000"

If mentioned, the dynamic provisioner will allocate a GID from this range. While deleting the claim, the GID will be released from it. 


Using gluster dynamic provisioner create a  PVC ,  for ex: claim1

Once the PV Is bound, attach the PVC to the pod , this pod has to be spawned in non privilged mode.

Then go to gluster pvc mount point in the pod.

Start writing to the volume.

Expected result :  The write from the pod should work without issues.

Validate the mount permissions, it will be "775" on this mount point.

The GID is internally created and passed to the POD as supplemental Group ID.

Please feel free to ping if you need any more details on this.

Comment 14 Bhavana 2016-12-14 13:34:05 UTC
Hi Humble,

Based on comment 13 I have the following queries. I am not sure if all of these are valid, but you can be the judge of that :)

1) If the admin has to configure GID range for the storage class, should this be added in the storage class file? If yes can you please provide a sample storage class file with the GID details added.

2) Is the PVC file same as the one that was added in section 5.2.1.3. Creating a Persistent Volume Claim, or are there changes to it and should that be included in the flow of steps.

3) Based on your comment "Once the PV Is bound, attach the PVC to the pod , this pod has to be spawned in non privilged mode." Is this pod file same as the step 1, in 5.2.1.5. Using the Claim in a Pod, or will there be changes here wrt to the GIDs

4) I need the steps for the following too:

Then go to gluster pvc mount point in the pod.

Start writing to the volume 

Are these the steps one performs after verifying that the PV is mounted in the container ? ( oc rsh busybox)



Link for reference: http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html

Comment 15 Humble Chirammal 2016-12-15 13:13:47 UTC
Bhavna, Can you please directly point to the doc where I can edit ?

Comment 16 Bhavana 2016-12-15 15:04:41 UTC
Hi Humble,

Following is the link to the google doc, where I have added the same queries so that it is easier to refer:

https://docs.google.com/a/redhat.com/document/d/1ezbk2vVRG7WvVH0qvYqNceX5wOckhTYnbfOXmz0WyJs/edit?usp=sharing

You can add the details here.

Comment 17 Humble Chirammal 2016-12-16 09:15:55 UTC
Bhavana, clearing needinfo based on our f2f discussion.

Comment 18 Bhavana 2016-12-16 12:52:07 UTC
Hi Humble,

Based on my meeting with you and Ashiq, I have added the details regarding volume security for dynamically provisioned volumes under section 5.3:

http://ccs-jenkins.gsslab.brq.redhat.com:8080/job/doc-Red_Hat_Gluster_Storage-3.4-Container_Native_Storage_with_OpenShift_Platform-branch-master/lastSuccessfulBuild/artifact/tmp/en-US/html-single/index.html#idm140149139570160

Let me know if you have any further comments or does this looks ok. Based on which I shall move this bug on_qa


Thanks

Comment 19 Humble Chirammal 2016-12-16 12:57:24 UTC
Bhavana, we also need to mention when deleting the claim, the GID of the PV is released from the pool.

Comment 21 krishnaram Karthick 2017-01-09 09:56:44 UTC
The document looks good, I have a minor change to suggest. I'll move the bug to verified once the change is made.

step 4 under Volume security for dynamically provisioned volumes,

# oc rsh busybox

# id

For example:

# id
uid=1000060000 gid=0(root) groups=0(root),2001

should be, 

# oc rsh busybox

$ id

For example:

$ id
uid=1000060000 gid=0(root) groups=0(root),2001

Comment 23 krishnaram Karthick 2017-01-09 15:57:51 UTC
doc content looks good to me, moving the bug to verified.


Note You need to log in before you can comment on or make changes to this bug.