RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1275379 - kubernetes apiserver missing capabilities to open port 443
Summary: kubernetes apiserver missing capabilities to open port 443
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: kubernetes
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jan Chaloupka
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1287902
TreeView+ depends on / blocked
 
Reported: 2015-10-26 17:41 UTC by Robert Rati
Modified: 2023-09-14 03:11 UTC (History)
6 users (show)

Fixed In Version: kubernetes-1.2.0-0.2.alpha1.git8632732.el7_2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-16 16:30:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0184 0 normal SHIPPED_LIVE kubernetes bug fix and enhancement update 2016-02-16 21:29:08 UTC

Description Robert Rati 2015-10-26 17:41:30 UTC
Description of problem:
Kubernetes upstream ansible installer adds capabilities to the kube-apiserver to allow the secured setup to run on port 443.  Specially, the installer uses:

setcap cap_net_bind_service=ep /usr/bin/kube-apiserver

This capability will be lost when the rpm packages are upgraded.  Ideally the kube-apiserver binary in the rpm would shipped with the capability or the functionality provided via the systemd unit file.

Version-Release number of selected component (if applicable):
kubernetes-master-1.0.3-0.1.gitb9a88a7.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Robert Rati 2015-10-26 17:48:24 UTC
[13:33:12] <walters> I think systemd is the correct and secure way to delegate binds to privileged ports to any application, containerized or not
[13:35:38] <eparis> walters: so what's the answer on a non-systemd system, ya' know?
[13:36:52] <walters> one can carry the traditional "start as root, bind, then drop privs" code as a build-time option and just disable it on systemd systems

Comment 7 Jason Brooks 2015-11-12 18:46:07 UTC
(In reply to Robert Rati from comment #0)
> Description of problem:
> Kubernetes upstream ansible installer adds capabilities to the
> kube-apiserver to allow the secured setup to run on port 443.  Specially,
> the installer uses:
> 
> setcap cap_net_bind_service=ep /usr/bin/kube-apiserver
> 
> This capability will be lost when the rpm packages are upgraded.  Ideally
> the kube-apiserver binary in the rpm would shipped with the capability or
> the functionality provided via the systemd unit file.

Another issue is that on atomic hosts, /usr is read-only, so ansible can't make this change, anyway. It works w/ fedora atomic, because fedora's kubernetes pkg gets CAP_NET_BIND_SERVICE in its spec file:

http://pkgs.fedoraproject.org/cgit/kubernetes.git/commit/?id=857cddbff129e70655e68ced08df11a931cb39e6

It's my understanding that systemd won't work to set the capabilities. I'm thinking about using ansible to copy the kube-apiserver service file over to /etc and change it to run as root...

Comment 8 Colin Walters 2015-11-13 16:20:29 UTC
(In reply to Jason Brooks from comment #7)

> It's my understanding that systemd won't work to set the capabilities. 

Not sure what that means.  My suggestion is to use a kubernetes-apiserver-443.socket unit, so that systemd listens on the socket, then activates the apiserver and passes the socket down.  No privileges would then be required for apiserver.

More info:
http://freedesktop.org/wiki/Software/systemd/DaemonSocketActivation/
and `man systemd.socket`.

Comment 9 Jason Brooks 2015-11-13 16:22:58 UTC
(In reply to Colin Walters from comment #8)
> (In reply to Jason Brooks from comment #7)
> 
> > It's my understanding that systemd won't work to set the capabilities. 
> 
> Not sure what that means.  My suggestion is to use a
> kubernetes-apiserver-443.socket unit, so that systemd listens on the socket,
> then activates the apiserver and passes the socket down.  No privileges
> would then be required for apiserver.

Got it, I thought you were talking about specifying "Capabilities=" in the unit file.

> 
> More info:
> http://freedesktop.org/wiki/Software/systemd/DaemonSocketActivation/
> and `man systemd.socket`.

Comment 10 Colin Walters 2015-11-15 13:57:59 UTC
See also https://github.com/kubernetes/contrib/pull/242

Comment 16 errata-xmlrpc 2016-02-16 16:30:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0184.html

Comment 17 Red Hat Bugzilla 2023-09-14 03:11:56 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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