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

APPSERV-151 Command to Generate a CSR #4700

Merged
merged 4 commits into from
Jun 23, 2020
Merged

Conversation

Pandrex247
Copy link
Member

Description

Adds a command to generate a CSR from the key store of a target instance or listener, placing the resultant CSR file under payara5/glassfish/tls/${alias}.csr

Important Info

Based off of #4694.
This PR actually only consists of three commits:

Testing

New tests

None

Testing Performed

Manually ran:

  • Generate CSR for s1as cert of DAS with default key store
  • Generate CSR for glassfish-instance cert of an instance with default key store
  • Generate CSR for s1as cert of DAS with default key store with changed master password
  • Generate CSR for glassfish-instance cert of an instance with default key store with changed master password
  • Generating a CSR when payara5/glassfish/tls directory doesn't exist
  • Generating a CSR when payara5/glassfish/tls directory already exists
  • Generating a CSR when a CSR with the same name already exists (should overwrite)

Testing Environment

Windows 10, JDK 8

Notes for Reviewers

To build please specify the BuildExtras profile and manually copy-pasta the Jar from appserver/extras/certificate-management/ into the payara5/glassfish/lib/asadmin directory.

@Pandrex247 Pandrex247 marked this pull request as ready for review June 5, 2020 11:13
Copy link
Contributor

@jbee jbee left a comment

Choose a reason for hiding this comment

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

Some comments, wanted to give you more time while I am testing to eventually start working on them.

* @throws MiniXmlParserException If there's an issue reading the domain.xml
* @throws CommandException If there's an issue getting the master password
*/
private void getStorePasswords(MiniXmlParser parser, String listener, File serverDir)
Copy link
Contributor

Choose a reason for hiding this comment

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

At some point it would be nice to move all the XML processing to one place. Maybe not now.

@jGauravGupta
Copy link
Contributor

jenkins test please

@Pandrex247
Copy link
Member Author

Database error? Que?
This isn't even bundled in Community.

@Pandrex247
Copy link
Member Author

Jenkins test please

@AlanRoth
Copy link

jenkins test please

@Pandrex247
Copy link
Member Author

Jenkins test please

@Pandrex247
Copy link
Member Author

Jenkins test please

1 similar comment
@Pandrex247
Copy link
Member Author

Jenkins test please

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

Successfully merging this pull request may close these issues.

4 participants