new question ... whenever i use `echo -n 'xyzzy' |...
# puppet-enterprise
j
new question ... whenever i use
echo -n 'xyzzy' | puppet access login deploy
it seems to work, but it also prints this (error? warning?) as well ...
Copy code
2025/10/30 20:42:20 WARN - inappropriate ioctl for device
any idea what this is talking about? (this is PE2023.8 on RHEL 9 x86_64 if that matters)
is it maybe trying to disable terminal echo before asking for a password, and complaining because STDIN is a pipe instead of a TTY?
c
Yup.
ioctl
is the system call used to disable terminal echo and it fails when STDIN is not a TTY.
j
it's too bad they didn't add a way to supply the password on the command line, or using an environment variable
or even better, provide a way to call the code manager API using the server's own SSL certs to authenticate, like i've been doing for other API calls (or is that possible and i missed it?)
i can understand the whole "token" thing if you want to accept deployment requests from other machines, but it's kind of a pain to have to generate a token every time you want to run
puppet code deploy
on the server itself.
s
You can create a long lived token.
j
sure, but (1) if i do that, people will forget until it expires and then suddenly panic, and (2) if a long-lived token "escapes", whoever has it can (ab)use it until it expires ... think of a stream of deployment requests every ten seconds, overloading the machine, causing a denial-of-service attack
my thought is, an hourly cron job which generates a new token whose lifetime is 62 minutes ... that way at any point in time there will be one active token, plus maybe a second token ... and then if a token escapes, the attacker will have no longer than 62 minutes to abuse it. (this is how i've handled other token-based authentication mechanisms in the past.)