Skip to content
This repository was archived by the owner on Oct 27, 2021. It is now read-only.

Conversation

@tsluyter
Copy link
Contributor

Jan requested that I describe my process of using ADCS to generate keys and certificates for the Graylog stack. This document is the first iteration of said documentation.

Jan requested that I describe my process of using ADCS to generate keys and certificates for the Graylog stack. This document is the first iteration of said documentation.
@CLAassistant
Copy link

CLAassistant commented Feb 21, 2019

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor Author

@tsluyter tsluyter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Thanks for the fixes! I cannot approve them in Github, but please go ahead and include these.

Copy link

@ChristopherKB ChristopherKB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Still way more confusing than it should be, but the docs are good.

Generating the keypair and certificates - preparation
===============

The following instructions assume that you generate all the keypairs on a Windows administrative workstation, or on the issuing CA itself (meaning, you'll need that extra "*Allow the private key to be exported*" flag). You can of course generate all keys on the Graylog stack servers and then simply submit the CSR (certificate signing request) to the CA.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change "You can of course generate..." to "You can, of course, generate..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following instructions assume that you generate all the keypairs on a Windows administrative workstation, or on the issuing CA itself (meaning, you'll need that extra "*Allow the private key to be exported*" flag). You can of course generate all keys on the Graylog stack servers and then simply submit the CSR (certificate signing request) to the CA.
The following instructions assume that you generate all the keypairs on a Windows administrative workstation, or on the issuing CA itself (meaning, you'll need that extra "*Allow the private key to be exported*" flag). You can, of course, generate all keys on the Graylog stack servers and then simply submit the CSR (certificate signing request) to the CA.


For some reason IExplore ignores the *ipaddress* field of the SAN (subject alternative name).

The above is only one of the needed .INF files; you will need one for each keypair being generated! So adjust all relevant fields and save each .INF file separately.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bold and italicize the sentence "you will need one for each keypair being generated!"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The above is only one of the needed .INF files; you will need one for each keypair being generated! So adjust all relevant fields and save each .INF file separately.
The above is only one of the needed .INF files; **you will need one for each key pair being generated**! So adjust all relevant fields and save each .INF file separately.

Generating the keypair and certificates - execution
===============

As said, we're assuming that you're generating the keypairs on your Windows administration station. If you're generating the keypairs on the Graylog Linux hosts, then you will need to use different instructions.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is unclear. If you need to use different instructions, where can those instructions be found?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
As said, we're assuming that you're generating the keypairs on your Windows administration station. If you're generating the keypairs on the Graylog Linux hosts, then you will need to use different instructions.
As said, we're assuming that you're generating the keypairs on your Windows administration station. If you're generating the key pairs on the Graylog Linux hosts, then you will need to use OpenSSL instructions (`For example <https://www.digitalocean.com/community/tutorials/openssl-essentials-working-with-ssl-certificates-private-keys-and-csrs>`_).

type D:\secrets\graylog\rootca.pem > D:\secrets\graylog\cachain.pem
type D:\secrets\graylog\rootca.pem >> D:\secrets\graylog\cachain.pem

The resulting cachain.pem file can be used in all Graylog stack applications for inclusion in the trust store. You will probably need to run the file through **dos2unix** first though, to fix line endings.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to expand this. If you will probably need to do it, the guide should cover how.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The resulting cachain.pem file can be used in all Graylog stack applications for inclusion in the trust store. You will probably need to run the file through **dos2unix** first though, to fix line endings.
The resulting cachain.pem file can be used in all Graylog stack applications for inclusion in the trust store. After uploading the file to Linux, you will need to run the file through **dos2unix** first, to fix line endings.

@ChristopherKB ChristopherKB merged commit f5519e6 into Graylog2:3.0 Feb 21, 2019
@tsluyter
Copy link
Contributor Author

tsluyter commented Feb 21, 2019

You've made some great comments Christopher! I'll try and pick all of those up RSN(tm).

@tsluyter
Copy link
Contributor Author

Hey @ChristopherKB I've added suggestions for each of your comments. Thanks for your time and help.

@tsluyter
Copy link
Contributor Author

tsluyter commented Feb 21, 2019

Wait, I just realized something important. Ben on the forums pointed out that the PKCS#8 keys are not usable for inputs on Graylog 3.0. Apparently they work differently. So these instructions are 100% guaranteed for <= v2.5. Inputs of 3.0 apparently need additional work.

EDIT:
Maybe I misunderstood Ben. Will need to investigate.

See here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants