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

Server alias names are not considered when searching renamed MDs #338

Closed
mkauf opened this issue Jun 7, 2024 · 6 comments
Closed

Server alias names are not considered when searching renamed MDs #338

mkauf opened this issue Jun 7, 2024 · 6 comments

Comments

@mkauf
Copy link
Contributor

mkauf commented Jun 7, 2024

The alias names of a new virtual host are not considered for the detection whether the new virtual host is actually an old virtual host that has been renamed (md_reg_sync_start() in md_reg.c). But the alias names should be considered if MDMembers auto is set.

The alias names are handled in auto_add_domains() in mod_md.c, but that's too late. md_reg_sync_start() is called earlier.

@mkauf
Copy link
Contributor Author

mkauf commented Jun 7, 2024

I'm not sure about the consequences of this bug... probably the only consequence is that mod_md sometimes requests a new certificate when it could use an existing one.

@icing
Copy link
Owner

icing commented Jun 7, 2024

So, the scenario where this bites is a vhost change of ServerName and have the previous name in ServerAlias? And the move detection does not catch this.

This would lead the domain being subject to cert generation and give it a fallback cert until this succeeds. Although a possibly working certificate is in the store.

I added test_md_702_033 in e5d131b for this situation. The rename detection is working.

@mkauf
Copy link
Contributor Author

mkauf commented Jun 7, 2024

Thank you for the test!

In this scenario, it does not work:

  • Old configuration: Virtual host with name "a", alias "b"
  • New configuration: This virtual host is renamed to "c", with aliases "a" and "b"

The code in md_reg_sync_start() searches using the name "c" so it does not find the MD of the old configuration.

@icing
Copy link
Owner

icing commented Jun 7, 2024

The code in md_reg_sync_start() searches using the name "c" so it does not find the MD of the old configuration.

Ah, ok. Well, I think I can live with that the server gets a new cert then.

@mkauf
Copy link
Contributor Author

mkauf commented Jun 7, 2024

Yes, mod_md needs to get a new certificate. If it would find the old MD, it could rename the directory md/domains/a to md/domains/c. Currently the directory md/domains/a just stays there, not used anymore, but that's a minor problem.

@icing
Copy link
Owner

icing commented Sep 6, 2024

No change planned on this.

@icing icing closed this as completed Sep 6, 2024
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