| |
@@ -143,9 +143,10 @@
|
| |
if os.path.exists(path) and not force:
|
| |
raise OSError(errno.EEXIST, os.strerror(errno.EEXIST), path)
|
| |
builder = x509.CertificateSigningRequestBuilder()
|
| |
- # Build the basic cert with the simple common name:
|
| |
+ # Build the basic cert with the "common name" and "uid" attributes:
|
| |
subject_name = x509.Name([
|
| |
x509.NameAttribute(NameOID.COMMON_NAME, username),
|
| |
+ x509.NameAttribute(NameOID.USER_ID, username),
|
| |
])
|
| |
builder = builder.subject_name(subject_name)
|
| |
# This is not a CA:
|
| |
Generate user certificates with a "UID" attribute in the subject field.
For now Koji's instructions tell users to configure
DNUsernameComponent = CN
. Eventually we may want to switch "CN" over to "UID". Some certificate authorities do not set the "CN" attribute to a simple username. For example Red Hat Certificate Server sets "CN" to "Ken Dreyer kdreyer", and "UID" to "kdreyer".As a first step, set both "CN" and "UID" attributes to the same value.