When there are failed substitutions (usually due to misconfiguration of profile), there is a somewhat cryptic StringIndexOutOfBoundsException:
StringIndexOutOfBoundsException
[10/Jun/2017:12:02:16][ajp-bio-127.0.0.1-8009-exec-1]: BasicProfile: populate() policy setid =serverCertSet [10/Jun/2017:12:02:16][ajp-bio-127.0.0.1-8009-exec-1]: SubjectNameDefault: populate start java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) at com.netscape.certsrv.pattern.Pattern.substitute2(Pattern.java:132) at com.netscape.cms.profile.def.EnrollDefault.mapPattern(EnrollDefault.java:804) at com.netscape.cms.profile.def.SubjectNameDefault.populate(SubjectNameDefault.java:160) at com.netscape.cms.profile.def.EnrollDefault.populate(EnrollDefault.java:224) at com.netscape.cms.profile.common.BasicProfile.populate(BasicProfile.java:1101) at com.netscape.cms.profile.common.EnrollProfile.populate(EnrollProfile.java:1330) at com.netscape.cms.servlet.cert.CertProcessor.populateRequests(CertProcessor.java:362)
We should catch exceptions related to failed substitutions in the SubjectNameDefault (and other profile components that use this substitution machinery) and report a better, more useful error message to the client.
Metadata Update from @mharmsen: - Custom field component adjusted to General - Custom field feature adjusted to '' - Custom field origin adjusted to Community - Custom field proposedmilestone adjusted to '' - Custom field proposedpriority adjusted to '' - Custom field reviewer adjusted to '' - Custom field type adjusted to defect - Custom field version adjusted to '' - Issue priority set to: critical - Issue set to the milestone: 10.4
Metadata Update from @mharmsen: - Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1466067 - Issue set to the milestone: 10.5 (was: 10.4)
Metadata Update from @mharmsen: - Issue priority set to: major (was: critical) - Issue set to the milestone: FUTURE (was: 10.5)
Per 10.5.x/10.6 Triage: 10.5
Metadata Update from @mharmsen: - Custom field lowhangingfruit adjusted to cfu: could be a low-hanging fruit - Issue set to the milestone: 10.5 (was: FUTURE)
Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.
This issue has been cloned to GitHub and is available here: https://github.com/dogtagpki/pki/issues/2856
If you want to receive further updates on the issue, please navigate to the GitHub issue and click on Subscribe button.
Subscribe
Thank you for understanding, and we apologize for any inconvenience.
Metadata Update from @dmoluguw: - Issue close_status updated to: migrated - Issue status updated to: Closed (was: Open)
Login to comment on this ticket.