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

feat: [CO 621] Allow LE certificates to be generated from Mailbox endpoint #175

Merged
merged 39 commits into from
Apr 6, 2023

Conversation

aheeva-yuliya
Copy link
Member

@aheeva-yuliya aheeva-yuliya commented Mar 13, 2023

What's changed:

  • add async to remote execution
  • start notifying global/domain recipients
  • change certbot working dir bcz of updated certbot package
  • slightly modify some old tests ("It ain't much, but it's honest work.") it won't help but better to run init server and clean data with every test

Current flow:

  1. the admin requests to issue cert with api
  2. mailbox starts checking everything what’s possible to check (if smth is wrong will thow an exeption)
  3. if everything is ok will send a response
    The System is processing your certificate generation request. It will send the result to the Domain notification recipients.
  4. meanwhile remote manager executing certbot command and recieve a message from it

we have 4 scenarios : №1 system failures (not related to certbot), №2 certbot failures, №3 certbot success (certificate recieved or certificate not yet due for renewal), №4 other (smth is wrong and wasn’t expected)

  1. we notifying global about first 3 with the messages we got (not modifying them)
  2. we notifying domain about №2 and about №3 (only if certificate was recieved) with the templates provided by Danielle Veri
  3. №4 stored under opt/zextras/log/mailbox.log

Related PRs:
zextras/carbonio-core-utils#38
https://github.com/Zextras/carbonio-build/pull/50
https://bitbucket.org/zextras/carbonio-core/pull-requests/42

@aheeva-yuliya aheeva-yuliya marked this pull request as ready for review March 30, 2023 13:50
@aheeva-yuliya aheeva-yuliya self-assigned this Mar 31, 2023
@aheeva-yuliya aheeva-yuliya added the enhancement New feature or request label Mar 31, 2023
Copy link
Contributor

@frisonisland frisonisland left a comment

Choose a reason for hiding this comment

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

I think the whole map logic is a bit confusing. Maybe consider a more streamlined version where you just do, from the notify:

  • parse output
  • create global mime message
  • create domain mime message
  • send both messages using the same sender
    This way we avoid having if conditions in the same method to handle domain and global case.
    it is also easier to spot the wanted behavior.

Copy link
Member

@keshavbhatt keshavbhatt left a comment

Choose a reason for hiding this comment

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

I added some suggestions and requested some changes.

Copy link
Contributor

@Polpetta Polpetta left a comment

Choose a reason for hiding this comment

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

Some minor details to fix, the implementation seems ok!

@aheeva-yuliya aheeva-yuliya requested a review from Polpetta April 4, 2023 11:49
@aheeva-yuliya aheeva-yuliya merged commit 6f797aa into devel Apr 6, 2023
@aheeva-yuliya aheeva-yuliya deleted the CO-621_issue_cert branch April 6, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants