Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 3 | configureEjbca() { |
| 4 | ejbca.sh config cmp addalias --alias cmpRA |
| 5 | ejbca.sh config cmp updatealias --alias cmpRA --key operationmode --value ra |
| 6 | ejbca.sh ca editca --caname ManagementCA --field cmpRaAuthSecret --value mypassword |
Aleksandra Maciaga | f630068 | 2020-03-04 17:11:30 +0100 | [diff] [blame] | 7 | ejbca.sh config cmp updatealias --alias cmpRA --key responseprotection --value pbe |
Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 8 | ejbca.sh config cmp dumpalias --alias cmpRA |
| 9 | ejbca.sh config cmp addalias --alias cmp |
| 10 | ejbca.sh config cmp updatealias --alias cmp --key allowautomatickeyupdate --value true |
Aleksandra Maciaga | f630068 | 2020-03-04 17:11:30 +0100 | [diff] [blame] | 11 | ejbca.sh config cmp updatealias --alias cmp --key responseprotection --value pbe |
Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 12 | ejbca.sh ra addendentity --username Node123 --dn "CN=Node123" --caname ManagementCA --password mypassword --type 1 --token USERGENERATED |
| 13 | ejbca.sh ra setclearpwd --username Node123 --password mypassword |
| 14 | ejbca.sh config cmp updatealias --alias cmp --key extractusernamecomponent --value CN |
| 15 | ejbca.sh config cmp dumpalias --alias cmp |
| 16 | ejbca.sh ca getcacert --caname ManagementCA -f /dev/stdout > cacert.pem |
| 17 | } |
| 18 | |
Aleksandra Maciaga | 7a5e3f6 | 2020-03-03 12:35:16 +0100 | [diff] [blame] | 19 | configureEjbca |