private void addRecords() {
        // FOr the time being just make sure there is a record.
        final List<JsonWebKeyRecord> list = JooqUtil.contextResult(identityDbConnProvider, context ->
                context.selectFrom(JSON_WEB_KEY).fetch());
        if (list.size() < 1) {
            addRecord();
        }
    }
This will always return a list of public keys creating them if needed.
stroom-security/stroom-security-identity-db/src/main/java/stroom/security/identity/db/JwkDaoImpl.java