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

ziti ops unwrap - invalid filemode #2047

Open
qrkourier opened this issue May 15, 2024 · 0 comments
Open

ziti ops unwrap - invalid filemode #2047

qrkourier opened this issue May 15, 2024 · 0 comments

Comments

@qrkourier
Copy link
Member

The ops unwrap command produces unreadable files because it unsets all filemode bits.

❯ ziti ops unwrap ./kenadmin-cert.json

❯ ls -lh kenadmin-cert*
-rw-rw-r-- 1 kbingham kbingham 9.6K May 15 15:11 kenadmin-cert.json
---------- 1 kbingham kbingham 3.2K May 15 15:12 kenadmin-cert.key
---------- 1 kbingham kbingham 2.0K May 15 15:12 kenadmin-cert.cert
---------- 1 kbingham kbingham 4.1K May 15 15:12 kenadmin-cert.ca

The workaround is to set u=rw on these files. The ziti edge enroll command doesn't unset any filemode bits, obeying the umask, so it's a good idea to unset go-rwx on that enrolled identity JSON file too.

❯ chmod -c 0600 kenadmin-cert*
mode of 'kenadmin-cert.ca' changed from 0500 (r-x------) to 0600 (rw-------)
mode of 'kenadmin-cert.cert' changed from 0500 (r-x------) to 0600 (rw-------)
mode of 'kenadmin-cert.json' changed from 0664 (rw-rw-r--) to 0600 (rw-------)
mode of 'kenadmin-cert.key' changed from 0500 (r-x------) to 0600 (rw-------)

This unwrap command might still be useful, but it would be ideal if we could log in with a standard Ziti identity file without first unwrapping it: #1730

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

No branches or pull requests

1 participant