Skip to content
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

Default secret mode to 400 #3585

Merged
merged 1 commit into from
Oct 13, 2021
Merged

Conversation

ashley-cui
Copy link
Member

Signed-off-by: Ashley Cui acui@redhat.com

What type of PR is this?

/kind bug

What this PR does / why we need it:

Fixed a bug where buildah bud mounted secrets permissions were incorrect due to a decimal/octal conversion error. buildah bud mounted secrets now have a default permission of 400.

How to verify it

Which issue(s) this PR fixes:

Fixes #3557

Special notes for your reviewer:

Does this PR introduce a user-facing change?


@openshift-ci openshift-ci bot added kind/bug Categorizes issue or PR as related to a bug. approved labels Oct 12, 2021
run_linux.go Outdated Show resolved Hide resolved
Fixed a bug where buildah bud mounted secrets permissions were incorrect due to a decimal/octal conversion error. buildah bud mounted secrets now have a default permission of 400. Fixes containers#3557

Signed-off-by: Ashley Cui <acui@redhat.com>
@rhatdan
Copy link
Member

rhatdan commented Oct 12, 2021

LGTM

@rhatdan
Copy link
Member

rhatdan commented Oct 12, 2021

@nalind
Copy link
Member

nalind commented Oct 12, 2021

LGTM

@umohnani8
Copy link
Member

/lgtm
/hold

@flouthoc
Copy link
Collaborator

LGTM, restarting flakes

@flouthoc
Copy link
Collaborator

/hold cancel
/approve
/lgtm

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 13, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ashley-cui, flouthoc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ashley-cui,flouthoc]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 982717a into containers:main Oct 13, 2021
@ashley-cui ashley-cui deleted the perms branch October 14, 2021 14:10
@seb-afk
Copy link

seb-afk commented Nov 26, 2021

Hi @ashley-cui thank you very much for this bugfix! Unfortunately my build is currently stuck due to this issue - is it already possible to install a buildah version with this bugfix included? (I am on RHEL8 using buildah version 1.21.4 (image-spec 1.0.1-dev, runtime-spec 1.0.2-dev). Thank you very much in advance! 🙌

@ashley-cui
Copy link
Member Author

@sebastianbertoli Looks like this hasn't gotten into a release version of buildah yet. Your best bet would be to either manually changing the mode of the secret using mode=400 or building from upstream.

@seb-afk
Copy link

seb-afk commented Nov 29, 2021

Hi @ashley-cui, thank you for the advice! I'll try it out the mode=400 tomorrow and hopefully get rid of my temporary workaround. 🚀

@seb-afk
Copy link

seb-afk commented Nov 30, 2021

Hi @ashley-cui,

is this supposed to work or am I overlooking something? Thanks!

$ buildah bud --tag foo:latest --secret id=MY_SECRET,src=SECRET_FILE,mode=400 .

I am getting this error: error creating build executor: incorrect secret flag format: should be --secret id=foo,src=bar

@rhatdan
Copy link
Member

rhatdan commented Nov 30, 2021

You might need a newer buildah?

@seb-afk
Copy link

seb-afk commented Nov 30, 2021

Hi @rhatdan thank you for reaching out! I am on RHEL8.4 and 1.21.4 which I thought is the latest official release: https://buildah.io/releases/ (?)

Do I need to follow these steps? https://github.com/containers/buildah/blob/main/install.md#rhel8-beta

Cheers! :)

@rhatdan
Copy link
Member

rhatdan commented Nov 30, 2021

https://github.com/containers/buildah/releases

@rhatdan
Copy link
Member

rhatdan commented Nov 30, 2021

RHEL8.5 should have buildah 1.23.1
@jnovy correct?

@jnovy
Copy link
Contributor

jnovy commented Nov 30, 2021

There is currently buildah-1.22.3 in the current 8.5. There will be 1.23.1 in the next 8.5 batch update - happening soon.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved kind/bug Categorizes issue or PR as related to a bug. lgtm locked - please file new issue/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reduce permissions of mounted secrets (build)
8 participants