What would you like to be added
Currently the OIDC id token JWT must have an Email field otherwise it is not considered to be an OIDC token: https://github.com/smallstep/cli/blob/master/token/parse.go#L76. While email is one of the standard claims, it is not required to be present (and in our case is not) and we would like certificates to be issued based only on the sub field, which is mandatory and present in all id tokens.
Interestingly https://github.com/smallstep/cli/blob/master/utils/cautils/certificate_flow.go#L275 where the CSR is created already has the email address as optional. But the requirement for OIDC tokens to have email addresses is hardcoded in a few other places.
Why this is needed
There are OIDC clients that are not people so don't have email addresses and it should still be possible to issue client certificates for them.
In addition email addresses are not always good identifiers - https://openid.net/specs/openid-connect-core-1_0.html#ClaimStability says:
The sub (subject) and iss (issuer) Claims, used together, are the only Claims that an RP can rely upon as a stable identifier for the End-User, since the sub Claim MUST be locally unique and never reassigned within the Issuer for a particular End-User, as described in Section 2. Therefore, the only guaranteed unique identifier for a given End-User is the combination of the iss Claim and the sub Claim.
All other Claims carry no such guarantees across different issuers in terms of stability over time or uniqueness across users, and Issuers are permitted to apply local restrictions and policies. For instance, an Issuer MAY re-use an email Claim Value across different End-Users at different points in time, and the claimed email address for a given End-User MAY change over time. Therefore, other Claims such as email, phone_number, and preferred_username and MUST NOT be used as unique identifiers for the End-User.
It should be possible to use any compliant OIDC provider with Step CA.
What would you like to be added
Currently the OIDC id token JWT must have an Email field otherwise it is not considered to be an OIDC token: https://github.com/smallstep/cli/blob/master/token/parse.go#L76. While email is one of the standard claims, it is not required to be present (and in our case is not) and we would like certificates to be issued based only on the sub field, which is mandatory and present in all id tokens.
Interestingly https://github.com/smallstep/cli/blob/master/utils/cautils/certificate_flow.go#L275 where the CSR is created already has the email address as optional. But the requirement for OIDC tokens to have email addresses is hardcoded in a few other places.
Why this is needed
There are OIDC clients that are not people so don't have email addresses and it should still be possible to issue client certificates for them.
In addition email addresses are not always good identifiers - https://openid.net/specs/openid-connect-core-1_0.html#ClaimStability says:
It should be possible to use any compliant OIDC provider with Step CA.