CONDOR_TOKEN_CREATE(1) | HTCondor Manual | CONDOR_TOKEN_CREATE(1) |
condor_token_create - HTCondor Manual
given a password file, create an authentication token for the IDTOKENS authentication method
condor_token_create -identity user@domain [-key keyid] [-authz authz ...] [-lifetime value] [-token filename] [-debug]
condor_token_create [-help ]
condor_token_create will read an HTCondor password file inside the SEC_PASSWORD_DIRECTORY (by default, this is the pool password) and use it to create an authentication token. The authentication token may be subsequently used by clients to authenticate against a remote HTCondor server. Tokens allow fine-grained authentication as individual HTCondor users as opposed to pool password, where anything in possession of the pool password will authenticate as the same user.
An identity must be specified for the token; this will be the client's resulting identity at the remote HTCondor server. If the -lifetime or (one or more) -authz options are specified, the token will contain additional restrictions that limit what the client will be authorized to do. If an attacker is able to access the token, they will be able to authenticate with the identity listed in the token (subject to the restrictions above).
If successful, the resulting token will be sent to stdout; by specifying the -token option, it will instead be written to the user's token directory. If written to SEC_TOKEN_SYSTEM_DIRECTORY (default /etc/condor/tokens.d), then the token can be used for daemon-to-daemon authentication.
condor_token_create is only currently supported on Unix platforms.
To create a token for jane@cs.wisc.edu with no additional restrictions:
$ condor_token_create -identity jane@cs.wisc.edu eyJhbGciOiJIUzI1NiIsImtpZCI6Il....bnu3NoO9BGM
To create a token for worker-node@cs.wisc.edu that may advertise either a condor_startd or a condor_master:
$ condor_token_create -identity worker-node@cs.wisc.edu \ -authz ADVERTISE_STARTD \ -authz ADVERTISE_MASTER eyJhbGciOiJIUzI1NiIsImtpZC.....8wkstyj_OnM0SHsOdw
To create a token for friend@cs.wisc.edu that is only valid for 10 minutes, and then to save it to ~/.condor/tokens.d/friend:
$ condor_token_create -identity friend@cs.wisc.edu -lifetime 600 -token friend
If the administrator would like to create a specific key for signing tokens, token_key, distinct from the default pool password, they would first use condor_store_cred to create the key:
$ openssl rand -base64 32 | condor_store_cred -f /etc/condor/passwords.d/token_key
Note, in this case, we created a random 32 character key using SSL instead of providing a human-friendly password.
Next, the administrator would run run condor_token_create:
$ condor_token_create -identity frida@cs.wisc.edu -key token_key eyJhbGciOiJIUzI1NiIsImtpZCI6I.....eyJpYXQiOUzlN6QA
If the token_key file is deleted from the SEC_PASSWORD_DIRECTORY, then all of the tokens issued with that key will be invalidated.
condor_token_create will exit with a non-zero status value if it fails to read the password file, sign the token, write the output, or experiences some other error. Otherwise, it will exit 0.
condor_store_cred(1), condor_token_fetch(1), condor_token_request(1), condor_token_list(1)
Center for High Throughput Computing, University of Wisconsin-Madison
HTCondor Team
1990-2024, Center for High Throughput Computing, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI, US. Licensed under the Apache License, Version 2.0.
August 25, 2024 |