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

Revoking a certificate does not work #134

Open
OliverSCE opened this issue Jul 6, 2024 · 6 comments
Open

Revoking a certificate does not work #134

OliverSCE opened this issue Jul 6, 2024 · 6 comments
Assignees

Comments

@OliverSCE
Copy link

Revoking a certificate in the gui does not work (nothing happens)

LabCA log states:
"'use admin -config path/to/cfg.json revoke-cert -serial deadbeef -reason X instead'"

which seems to be a boulder error message about a malformed argument string in the revoke command.

The certificate to be revoked is one which was issued for the labca sever itself, but is not in use any more. Just in case this matters...

@OliverSCE
Copy link
Author

Just verified: I also doesn't work with any other certificate.

@hakwerk
Copy link
Owner

hakwerk commented Jul 7, 2024

I haven't tested it myself yet, but probably the fix is to change this line in /home/labca/labca/commander from

docker compose exec boulder bin/admin-revoker serial-revoke --config labca/config/admin-revoker.json $serial $reasonCode 2>&1

to

docker compose exec boulder bin/admin -config labca/config/admin.json revoke-cert -serial $serial -reason $reasonCode 2>&1

@OliverSCE
Copy link
Author

OliverSCE commented Jul 9, 2024

The error message changes now. It first gives a server error, an the labca log states:

2024-07-09T16:22:53.924487+00:00Z admin[1008]: 3 admin ntOk6wg [AUDIT] executing subcommand: got unacceptable revocation reason "5"
gui-1 | 2024-07-09T16:22:53.924457+00:00Z admin[1008]: 6 admin gqfPqws [AUDIT] admin tool executing a dry-run with the following arguments: "bin/admin -config labca/config/admin.json revoke-cert -serial 7fb2d308a535cc7d5453b2c40fcd2456d364 -reason 5"

@OliverSCE
Copy link
Author

Update: hardcoding the reason "superseeded" into the command does seems to be ok, but only does a dry run:

gui-1 | 2024-07-09T16:29:07.703065+00:00Z admin[1022]: 6 admin 983jqAM [AUDIT] admin tool executing a dry-run with the following arguments: "bin/admin -config labca/config/admin.json revoke-cert -serial 7fb2d308a535cc7d5453b2c40fcd2456d364 -reason superseded"
gui-1 | 2024-07-09T16:29:07.703089+00:00Z admin[1022]: 6 admin 6MX16g0 Found 1 certificates to revoke
gui-1 | 2024-07-09T16:29:07.703847+00:00Z admin[1022]: 6 admin oN-h9wY dry-run: "serial:"7fb2d308a535cc7d5453b2c40fcd2456d364" code:4 adminName:"root""
gui-1 | 2024-07-09T16:29:07.703879+00:00Z admin[1022]: 6 admin 9_mC6gM [AUDIT] admin tool has successfully completed executing a dry-run with the following arguments: "bin/admin -config labca/config/admin.json revoke-cert -serial 7fb2d308a535cc7d5453b2c40fcd2456d364 -reason superseded"
gui-1 | 2024-07-09T16:29:07.703894+00:00Z admin[1022]: 6 admin 7tT7rAY Dry run complete. Pass -dry-run=false to mutate the database.'

Adding "-dry-run=false" to the command does the trick, but not sure if this breaks something else.

@hakwerk
Copy link
Owner

hakwerk commented Jul 11, 2024

Thanks for the info! I will have a better look when I find some time

... but not sure if this breaks something else.

I expect it will be totally fine, but I need to have a better look at it

@hakwerk hakwerk self-assigned this Jul 11, 2024
@OliverSCE
Copy link
Author

You are probably right, so far it seems to be totally fine, except that the revoke reason is hardwired in the command file.

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

2 participants