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

Prevent unwanted organization detach from server #24

Merged

Conversation

lorepanichi
Copy link
Contributor

Right now any update of the organizations attached to a server resource is handled detaching the ones in the old list and attaching the ones in the new list.

A side effect of this behaviour is the server loss of the former primary organizazion and primary user, even if this former organization was never intended to be removed in the first place.
The loss of primary org/user triggers, at server restart, the generation of a new server certificate, issued by the new established primary organization CA.

Any client ovpn profile in use that don't have the latter CA present in its ca.pem won't be able to validate the new server certificate.

As a solution, the list of organizations to be detached (and than the one to be attached) will be the result of a diff between the two different lists of organizations. In doing so, only the organizations that were explicitly removed will be detached from server.

Copy link
Owner

@disc disc left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@disc disc merged commit 04b8e1f into disc:master Sep 7, 2022
@lorepanichi lorepanichi deleted the prevent-unwanted-organization-detach-from-server branch September 11, 2022 20:06
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