Skip to content

Added support to download Let's Encrypt Certificate #1343

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

Merged
merged 13 commits into from
Sep 2, 2021

Conversation

ssrahul96
Copy link
Contributor

@ssrahul96 ssrahul96 commented Aug 23, 2021

Covered Issue #404

image

@jc21
Copy link
Member

jc21 commented Aug 23, 2021

This is an automated message from CI:

Docker Image for build 2 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@jc21
Copy link
Member

jc21 commented Aug 23, 2021

This is an automated message from CI:

Docker Image for build 3 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@ssrahul96 ssrahul96 changed the title added endpoint to download certificates Added option to download SSL Certificate Aug 23, 2021
@jc21
Copy link
Member

jc21 commented Aug 23, 2021

This is an automated message from CI:

Docker Image for build 4 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@ssrahul96 ssrahul96 changed the title Added option to download SSL Certificate Added support to download SSL Certificate Aug 23, 2021
@jc21
Copy link
Member

jc21 commented Aug 23, 2021

This is an automated message from CI:

Docker Image for build 5 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

Copy link
Contributor Author

@ssrahul96 ssrahul96 left a comment

Choose a reason for hiding this comment

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

handled by using certificate.provider

@jc21
Copy link
Member

jc21 commented Aug 24, 2021

This is an automated message from CI:

Docker Image for build 6 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@jc21
Copy link
Member

jc21 commented Aug 24, 2021

This is an automated message from CI:

Docker Image for build 7 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@ssrahul96 ssrahul96 changed the title Added support to download SSL Certificate Added support to download Let's Encrypt Certificate Aug 24, 2021
@ssrahul96
Copy link
Contributor Author

@jc21 , can it be merged?? or any other additional changes required??

@jc21
Copy link
Member

jc21 commented Aug 30, 2021

This is an automated message from CI:

Docker Image for build 8 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@jc21
Copy link
Member

jc21 commented Aug 31, 2021

Hmm no it doesn't seem to be ready. Have you tested this yourself?

I just tried it for some LE certs, take a look:

Screen Shot 2021-09-01 at 7 36 55 am

You'll notice that the files are not the actual files, they are symlinks. So your code to zip stuff up needs to dereference (or follow?) the symlinks somehow to include the actual files instead.

@jc21
Copy link
Member

jc21 commented Sep 1, 2021

This is an automated message from CI:

Docker Image for build 9 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@ssrahul96
Copy link
Contributor Author

Hmm no it doesn't seem to be ready. Have you tested this yourself?

I just tried it for some LE certs, take a look:

Screen Shot 2021-09-01 at 7 36 55 am

You'll notice that the files are not the actual files, they are symlinks. So your code to zip stuff up needs to dereference (or follow?) the symlinks somehow to include the actual files instead.

Handled with the actual path
image

@jc21
Copy link
Member

jc21 commented Sep 1, 2021

Well yes it's an improvement, but you only have 1 certificate in that folder. The majority of users who have certs renewing over time will have all the old ones too. In my example above I have 21 certificates (84 files). Your script will zip them all up instead of the most current one.

This is why I think dereferencing those symlinks is a better idea than grabbing everything from archive.

@jc21
Copy link
Member

jc21 commented Sep 1, 2021

This is an automated message from CI:

Docker Image for build 10 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@jc21
Copy link
Member

jc21 commented Sep 1, 2021

This is an automated message from CI:

Docker Image for build 11 is available on DockerHub as jc21/nginx-proxy-manager:github-pr-1343

Note: ensure you backup your NPM instance before testing this PR image! Especially if this PR contains database changes.

@ssrahul96
Copy link
Contributor Author

ssrahul96 commented Sep 1, 2021

Well yes it's an improvement, but you only have 1 certificate in that folder. The majority of users who have certs renewing over time will have all the old ones too. In my example above I have 21 certificates (84 files). Your script will zip them all up instead of the most current one.

This is why I think dereferencing those symlinks is a better idea than grabbing everything from archive.

deferenced the symlinks and zipped the certs using realpathSync

image

@jc21 jc21 merged commit 1626c8e into NginxProxyManager:develop Sep 2, 2021
@jc21
Copy link
Member

jc21 commented Sep 2, 2021

Working beautifully thanks :)

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.

2 participants