<div dir="ltr">How your default policy looks? Are you using pre-generated keys for your existing zones? What happens if you try to pre-generate keys for 2 or 3 years. Since you are using SoftHSM it should not be an issue (in terms of space/licensing) to pre-generate more keys in advance.<div>Generally speaking about pre-generation of keys it's very useful when you want set your HSM read-only by disabling key generation/deletion in the API. I never tried that with SoftHSM, is that your use case?</div><div><br></div><div>Emil</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2019 at 6:41 AM Paul Wouters <<a href="mailto:paul@nohats.ca">paul@nohats.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I'm trying to get myself out of a situation where for a newly added<br>
domain, the enforcer isn't generating keys.<br>
<br>
I thought I could be smart by giving it some pregenerates keys but:<br>
<br>
[root@ns0 ~]# ods-ksmutil key generate --policy default --interval 1Y --zonetotal 1<br>
Key sharing is Off<br>
Info: converting 1Y to seconds; M interpreted as 31 days, Y interpreted as 365 days<br>
HSM opened successfully.<br>
Info: 21 zone(s) found on policy "default"<br>
Info: Keys will actually be generated for a total of 1 zone(s) as specified by zone total parameter<br>
-19 new KSK(s) (2048 bits) need to be created for policy default: keys_to_generate(-19) = keys_needed(2) - keys_available(21).<br>
14 new ZSK(s) (2048 bits) need to be created for policy default: keys_to_generate(14) = keys_needed(13) - keys_available(-1).<br>
*WARNING* This will create 0 KSKs (2048 bits) and 14 ZSKs (2048 bits)<br>
Are you sure? [y/N]<br>
<br>
So I'd rather not try and see what happens when it tries to generate -19 keys.<br>
<br>
Any advise on how to get out of this?<br>
<br>
Others ran unto this issue as well:<br>
<a href="https://issues.opendnssec.org/browse/OPENDNSSEC-752" rel="noreferrer" target="_blank">https://issues.opendnssec.org/browse/OPENDNSSEC-752</a><br>
<br>
When running: ods-ksmutil key list -v --all<br>
<br>
I see a seemingly infinite amount of:<br>
<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 5de538d0181444d59d300602ae91cb6a SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 d73959d1d50b92a31c72225061a0b4a3 SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 721809ffc35c101608071c945e7d0e3d SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 89613f35abfa68a5036604e1ea51a9e9 SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 fe0aa7b6539f09e3c75ec5276529001f SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 5360ede39c4eec4c847517ae5730e3f0 SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 457e9e4f60213a9a77b5dd1792a4c871 SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 661349d7d2a18ea2a32eaeb9b427544f SoftHSM<br>
NOT ALLOCATED generate (not scheduled) (publish) 2048 5 94572e6ff8340ceae5a88a6c38ca969b SoftHSM<br>
<br>
It seems the newly added zone got a ZSK generated, but no KSK. Which<br>
seems related to the negative number of KSK's it wants to generate.<br>
<br>
This is using opendnssec-1.4.14-1.el6.x86_64<br>
<br>
Paul<br>
_______________________________________________<br>
Opendnssec-user mailing list<br>
<a href="mailto:Opendnssec-user@lists.opendnssec.org" target="_blank">Opendnssec-user@lists.opendnssec.org</a><br>
<a href="https://lists.opendnssec.org/mailman/listinfo/opendnssec-user" rel="noreferrer" target="_blank">https://lists.opendnssec.org/mailman/listinfo/opendnssec-user</a><br>
</blockquote></div>