Issuance grants
An issuance grant says what a particular caller may ask for. Not whether it reaches the certificate authority — the network answers that — but what it gets when it does: which names, under which issuer, from which profile, valid for how long.
Without that second half of the answer, any caller that reaches the port could ask for a certificate on any name at all — including the name of a certificate authority. The grant is the boundary the network alone does not draw.
Refusal is the default. With no row for a caller, that caller gets nothing. With the whole list empty, the service issues nothing to anybody. An empty list here is not an absence of policy, it is the policy of refusing everybody. For the same reason an empty pattern list inside a grant means nothing permitted and never "everything permitted".
What was actually turned away is in the refusals.
Only with the permission
Issuance grants are security policy. Whoever can read them knows the installation's attack
surface; whoever can change them can have a certificate issued to themselves on any name. Reading
takes the permission pki.issuance-grant.read and changing them pki.issuance-grant.manage; both
belong to the template Administrator only.
The check does not happen in the user interface. The API refuses every other caller anyway — the surface asks the PKI what the user may do there and merely hides screens and buttons, so that a user without the permission is given a sentence to read instead of a screenful of failed requests. The same holds for the refusals and the subordinate authorities.
A new assignment takes effect with the account's next token, within five minutes. Signing in again helps at once, because that mints a new token.
Patterns
Three lists in a grant are made of patterns: the permitted profiles, the permitted issuers and the permitted names. All three must hold something — the form will not save while one of them is empty, because an empty list permits nothing and the grant would be inert.
Patterns are globs, not regular expressions:
| Character | Meaning |
|---|---|
* | any run of characters, including none |
? | exactly one character |
And three rules worth knowing, because they are the difference between a narrow pattern and a wide one:
- Anchored at both ends.
Noritecmatches only exactlyNoritecand notNoritec MNC Root. If you mean the beginning, writeNoritec*. - Case does not matter.
mnc*andMNC*match the same things. - No dot-star, no plus, no groups. What is familiar from regular expressions does not apply
here;
.*looks literally for a dot followed by any run of characters.
A list and not one expression: several entries are several decisions. A caller legitimately asks for names of several shapes, and the one expression that covers them all covers far too much.
What goes in which of the three lists, and who the row applies to at all:
- The client id — whom the grant is for
- Permitted profiles — which template may be issued from
- Permitted names — whom the certificate may be made out to
- Permitted issuers — which authority may sign it
Whether a pattern really matches what it is meant to is answered by the pattern probe — and answered with the service's own comparison.
The client id
The id is the client_id out of the caller's token. It is the row's key: it is fixed while editing,
because a changed id would create a second grant and leave the first one standing — which is not
what "rename" looks like to anybody who tries it.
The picker offers the machine clients registered at the Identity Provider. It is a suggestion
and never the whole truth: this installation's three host clients — mnc-servicecenter,
mnc-gateway and mnc-jobs — are deliberately not among them, because that screen is for API
keys and a gateway revoked there would stop every certificate renewal while looking like an ordinary
revocation. Those three are typed in here by hand.
If a grant already exists for an id, the form says so before anything is saved: saving replaces it completely and adds nothing.
The note beside it is free text and for people — what this caller needs certificates for. It appears under the id in the list and is covered by the search, because a grant is looked up by its purpose as often as by its name.
Permitted profiles
These are profile names, not identifiers. There is a reason, and it shows the first time an installation is set up: the grants have to stand before the profiles are created, and an identifier that does not exist yet cannot be written down. A name can be written down.
Wildcards are allowed and usual. The picker suggests the profiles that are there but also takes text for something that is not.
The filter over this column in the list answers the first question of any review — "who may mint
device identities" — and it answers it with the certificate authority's own comparison. A grant
whose list holds only * is found by it although it contains not one letter of the name in
question. A text search over the column would have hidden precisely the widest grants.
See also Profiles.
Permitted names
Patterns over the common name the caller may ask for. This is the most important of the three lists, because it decides whom a certificate may be made out to.
One entry per row, and not one expression for everything. A gateway, for instance, legitimately asks for device identities and for the names of its own listeners — two shapes, two rows. The one expression covering both covers everything in between as well.
For a device the common name is the colon-separated EUI, that is 70:b3:d5:67:70:00:00:01 and
not the urn:eui64 name that additionally sits in the certificate as a SAN. This is the mistake
made most often here: a pattern urn:eui64:* looks right and would refuse every device enrolment. A
device pattern is written ??:??:??:??:??:??:??:??.
The other mistake is the opposite one: a row that is missing. A gateway whose grant listed its protocol listeners but not its enrolment listener was left without a certificate on that port — and nothing in the failure named a grant. The pattern probe catches both ends.
Permitted issuers
Patterns over the issuing authority's common name — that is, over which certificate authority this caller may have things signed by.
For a self-signed root that is the same name on both sides: the root is its own issuer. Where this installation hangs beneath a customer's root, the issuer is the subordinate authority and carries its name.
The list is why a caller cannot simply pick the highest authority available: being allowed to issue device identities is a long way from being allowed to sign directly beneath the root.
Maximum validity
A ceiling in days, independent of the profile. Left empty, whatever the profile says applies — which is not unlimited validity but the template's validity.
A caller asking for more days than the grant permits is refused, not quietly cut down. The reason appears in the refusals as "validity too long".
The caller's permission
A grant alone lets nobody issue anything: the caller also needs the permission pki.certificate.issue
from the identity. Whether it holds it, the PKI asks the identity (AuthZEN) and shows it in the list and
in the grant's detail:
| Shown | Meaning | What to do |
|---|---|---|
| Held | The caller holds the permission. | Nothing. |
| Missing | The grant is in place, but the caller gets nothing. | At the identity, under System › Assignments, give the client a role that contains pki.certificate.issue; the services of the MNC get it from the installation. |
| Unknown | The identity did not answer. | Look again later; it says nothing about the caller. |
The PKI keeps the answer for 30 seconds; a new assignment shows after that, and at the caller itself with its next token.
What the grant does not decide
Since PKI 11 the grant bounds only the content: which names, issuers, profiles and validities a caller can get. Whether it may do something is decided by its permission. That comes from the identity (roles and assignments under System), stands in the caller's token for the PKI, and the PKI checks it on every call. Three rights used to be switches in the grant and are such permissions now:
| Right | Permission | Who holds it |
|---|---|---|
| Export a private key | pki.private-key.export | template Administrator; as a service only the Service Center |
| Request and import a subordinate certificate authority | pki.authority.subordinate | template Administrator; never a service |
| Manage connector material | pki.connector-credential.manage | template Administrator; as a service only the Application Center |
What the grant still does there: a service needs an enabled grant to export a key and to handle connector material, a person the grant of the user interface they come through. Without the permission the PKI refuses before it reads the grant, and writes the refusal into the refusals.
Private key export
The one right that lets key material out of the service. A key that leaves the service exists in two places from then on; it cannot be called back, and revoking the certificate does not invalidate the copy. It is meant for a person downloading a centrally generated device key (see where the key comes from).
Subordinate certificate authority
A subordinate authority carries CA:TRUE and keyCertSign: it issues names on its own account and
never passes a pattern of a grant again. That is why it hangs on no grant but only on
pki.authority.subordinate, and no service ever gets that permission.
Connector material
Upload, list, move to the trash and fetch for a connector the uploaded certificates and keys of connectors. The Application Center fetches the material for its connectors; a person sees and manages it there, not here.
Suspending and deleting
Two ways to make a grant ineffective, and the smaller one is not the one you would expect.
Suspending is the "grant in force" switch in the form. The row stays and behaves like none: the caller gets nothing any more, and the refusals carry the reason "grant disabled". Everything written in it is kept — it can be put back in force with one click, and in the meantime it can be read to see what it would have permitted. This is the path for a suspicion, a migration, a test.
Deleting removes the row. Afterwards the caller may issue nothing at all — including what it renews today, because a renewal is a new issuance like any other. The caller does not lose its certificates immediately; it loses them when the first one expires and cannot be replaced. That is not a smaller step than suspending, it is a larger one, and it cannot be undone: the patterns are gone and have to be written again.
Anybody wanting to be rid of a grant because they believe it is unused should suspend it and watch the refusals for a while.
Who changed it stands in the list under "Last changed", and in the view of a grant together with who created it: the display name of the account, "Deleted user" for an account that no longer exists, and for the PKI itself "PKI (default at start)" for the grants a fresh installation writes for its own services. The PKI stores only the identifier of the account, never a name.
Trying a pattern out
The pattern probe answers one question: would this pattern admit the name X? It sits in two places — in the form directly beneath the name patterns, and as a view of its own under the row action "try a name", so that a grant can be read and checked without opening it in an editor where a stray keystroke would be a change to security policy.
What is typed in is the common name the caller would ask for — for a device therefore the
colon-separated EUI, not the urn:eui64 name out of the SAN.
The verdict comes from the service itself. It is the same comparison that admits or refuses an issuance, and not a second reimplementation of it in the browser. The difference is the one between "agrees, we hope" and "is": a reimplementation would have been confidently wrong on exactly the day somebody changed one side and not the other.
The answer names every pattern separately as a match or no match, and above them a verdict over the whole list. If none matches, it says refused and not "no result" — here "nothing found" and "turned away" are the same thing, and it has to read that way.
If the check does not get through, the view says so as a failure and never as a refusal. "No" and "could not find out" look identical and are opposites; mistaking one for the other is how a pattern gets widened for no reason.
The name typed in is not trimmed. The service matches the pattern as stored against the common name as asked for, with no tidying on either side — a probe that trimmed would be right about a string nobody is ever going to present.