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

Implement self-signed certificates for HTTPS #49

Merged
merged 5 commits into from
Sep 14, 2024
Merged

Conversation

samj
Copy link
Contributor

@samj samj commented Sep 13, 2024

Implemented self-signed certificate creation to enable HTTPS out of the box as Webauthn (PR #33) requires it.

We should also add support for Let's Encrypt by integrating certbot (with schedule for renewals every 60 days).

@samj samj requested a review from quaid as a code owner September 13, 2024 23:22
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
23.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@samj samj changed the title Feat/certificates Implement self-signed certificates for HTTPS Sep 13, 2024
@samj
Copy link
Contributor Author

samj commented Sep 13, 2024

SonarCloud warning is to be expected because there are two options for running pAI-OS which are very similar: main.py from the root (eg python -m paios), which will also serve up the frontend, or a similar file in the backend folder for running API-only mode. We should however consolidate these or remove one of them.

<p><code>npm run build</code> in the frontend directory.</p>
<p>Or, to run a development server, use:</p>
<p><code>npm run dev</code> and connect to that instead.</p>
<p>Alternatively, you can checkout the <code><a href="https://github.com/pAI-OS/paios/tree/canary">canary</a></code> branch which includes a build.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p>Alternatively, you can checkout the <code><a href="https://github.com/pAI-OS/paios/tree/canary">canary</a></code> branch which includes a build.</p>
<p>Alternatively, you can checkout the <code><a href="https://github.com/pAI-OS/paios/tree/canary">canary</a></code> branch that includes a build.</p>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TIL something from the cloud brain who wrote it:

When choosing between “which” and “that,” the word “which” is used for non-restrictive clauses (adding extra information), while “that” is used for restrictive clauses (necessary for the sentence to make sense).

In this case, “which” is appropriate because the part about the build seems like additional information, not something crucial to identifying the “canary” branch.

My reading of it is that the first/current option gives the additional information that the canary branch includes a build, while the second option makes it mandatory, implying that you need to find one of several canary branches: the one that includes a build.

Copy link
Contributor

@quaid quaid left a comment

Choose a reason for hiding this comment

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

Looks good to me, I can't confirm or test the Windows file system code but overall it seems to be correct, thorough, and with clear-enough error messages and directions.

@samj
Copy link
Contributor Author

samj commented Sep 14, 2024

Thanks for the reminder to test on Windows (which I have done).

@samj samj merged commit bd78f04 into develop Sep 14, 2024
1 of 2 checks passed
@samj samj deleted the feat/certificates branch September 14, 2024 05:24
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