Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CA_DEFAULT_SUBJECT #95

Closed
doubledipped opened this issue Dec 8, 2022 · 2 comments
Closed

CA_DEFAULT_SUBJECT #95

doubledipped opened this issue Dec 8, 2022 · 2 comments

Comments

@doubledipped
Copy link

I wonder if someone could post an example of how to set CA_DEFAULT_SUBJECT in a localsettings.yaml file please?

I am using the latest release via docker-compose and I would really like to be able to set defaults to be used with all certificate profiles but I just can't seem to get the syntax correct. The release notes state that this has been migrated from a dict object to a tuple, but I would really appreciate an example of how to define the subject in an an external yaml file.

Many thanks

@mathiasertl
Copy link
Owner

Hi @doubledipped !

but I would really appreciate an example of how to define the subject in an an external yaml file.

I could not agree more that this should be part of the documentation, and it's shamefully not. To get you started, here is an example from my config... with a specific override in a dedicated profile:

CA_DEFAULT_SUBJECT:
        - ["O", "DefaultOrg"]
        - ["OU", "Default OrgUnit"]
        - ["OU", "Default OrgUnit 2"]

CA_PROFILES:
  other_profile:
    # other config
    subject:
        - ["O", "MyOrg"]
        - ["OU", "My OrgUnit"]
        - ["OU", "My OrgUnit 2"]

I'll work on properly documenting this properly next, including all more exotic fields.

In the meantime, help your self to this dict for a complete list: https://github.com/mathiasertl/django-ca/blob/1.22.0/ca/django_ca/utils.py#L91 (note: location of this variable will change in a future release).

@doubledipped
Copy link
Author

That's perfect, thank you Mathias. I was struggling to get the yaml format correct, but by following the examples you have kindly provided, it is all working now. Thank you very much for taking the time to respond

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants