Comments (6)
its worth noting that i've made sure there are no newlines in the secret.pem file itself in S3.
from citadel.
Hmm, how are you verifying there is no newline in the file on S3? I don't see anything in the code that would risk a rogue character being added, just a straight HTTP GET call :-/
from citadel.
I just echo'ed a sample string into a new file and cat it.
What I upload to S3:
falcon@nest:~$ echo 'supersecret' > secret.pem
falcon@nest:~$ cat secret.pem
supersecret
falcon@nest:~$
Example of a file containing a newline:
falcon@nest:~$ echo -e "supersecret\n" > secret.pem
falcon@nest:~$ cat secret.pem
supersecret
falcon@nest:~$
I totally agree with you, code wise it doesn't look like any newlines are being added, but it seems to me that S3 itself is returning the new line for some reason.
Maybe i'm just nuts? lol i'll try to do some more digging shortly.
from citadel.
@domofactor try echo -n 'supersecret'
man echo
...
-n
Do not print the trailing newline character
from citadel.
Closing this as not reproducible.
from citadel.
@coderanger I can reproduce this:
try to create a template like this:
template "/tmp/test" do
source "test.erb"
owner "root"
group "root"
mode 0660
variables({
:password => node['cookbook_teste]['password']
})
end
will generate this:
cat /tmp/test
password=P455word
if I create a file in my s3 bucket with this content:
P455word
and modify my recipe to use citadel like this:
template "/tmp/test_citadel" do
source "test.erb"
owner "root"
group "root"
mode 0660
variables({
:password => citadel['keys_secrets/password']
})
end
The result will be a /tmp/test_citadel with this content, including a breakline
P455word
diff between files /tmp/test /tmp/test_citadel
12:04:13 ip-10-0-54-20:~# diff /tmp/teste /tmp/teste_citadel
2a3
from citadel.
Related Issues (20)
- How to use in attributes HOT 2
- Recommended approach for provisioning during image creation (packer etc) HOT 2
- bucket name, https, static website hosting? HOT 8
- nvironment files rb format
- Use STS to handle overlapping roles? HOT 4
- Getting Net::HTTPServerException when running on an instance with no IAM role HOT 1
- Cookbook Version 1.1.0 Silently Fails To Render S3 Content HOT 9
- Follow redirect for buckets in other regions
- Create ChefSpec HOT 5
- newline in key value due to the citadel method ref issue #20 HOT 5
- Doesn't work with AWS4-HMAC-SHA256
- NoMethodError - undefined method `[]' for nil:NilClass HOT 12
- AWS SDK usage HOT 1
- Chef::Exceptions::CookbookNotFound HOT 3
- S3 best practice documentation HOT 9
- Issues with Citadel::S3.get HOT 3
- citadel not able to download the object from Frankfurt region HOT 3
- Release on Chef Community site? HOT 1
- Chef 11.14.0 no longer stores IAM data in ohai HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from citadel.