-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Changed to passing a Domain object, hardened the lints and update the readme.md #6
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #6 +/- ##
==========================================
- Coverage 35.19% 35.00% -0.20%
==========================================
Files 2 9 +7
Lines 429 440 +11
==========================================
+ Hits 151 154 +3
- Misses 278 286 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Let's upgrade to: lints: ^3.0.0 |
As requested I've move to lints 3.x |
… that you can configure the server on an alternate port. I now pass the httpPort down into the challenge so it can set the url correctly.
I've maked the old api as deprecated.
Let's bump the version to 1.3.0 |
…certificate as currently we provide no information on what went wrong.
I now have a secure server up and running using the new code :) |
…crypt ctor as we had methods that needed access to the port. The bindingAddress could have been left on the startServer method but it seemed more logic for these three values to be together. Change the version to 2.0.0 to reflect the breaking change.
… the alternate port passed in the ctor causing the call to fail.
…t runs a renewal service that restarts the server as required.
I think this is now ready to be merged unless you have any specific issues. The key point is the breaking change to startServer |
Please, check if any dependency need to be updated: acme_client: ^1.3.0 |
Hi, I will check this PR this week. Do you have any update to it? |
No I'm done.
…On Tue, 23 Jan 2024, 9:01 am Graciliano Monteiro Passos, < ***@***.***> wrote:
Hi, I will check this PR this week. Do you have any update to it?
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OEHWY5CYLFMX7QJZNDYP3OT7AVCNFSM6AAAAABAMNOSE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBUHEYDAMBQGQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
## Permissions | ||
On Linux you need to be root (sudo) to open a port below 1024. If you try | ||
to start your server with the default ports (80, 443) you will fail. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add a documentation for setcap
to avoid execution as root:
Enabling the dart
VM:
sudo setcap 'cap_net_bind_service=+ep' /usr/lib/dart/bin/dart
Enabling a self-executable (from dart compile exe your_tool.dart
):
sudo setcap 'cap_net_bind_service=+ep' your_tool.exe
FWIW: I use the dcli package to do this (I'm the author).
```
import 'package:dcli/dcli.dart';
void main() {
final shell = Shell.current;
if (!shell.isPriviliegedProcess()) {
print('you must run as root)';
exit(1);
}
/// stop executing as sudo
shell.releasePrivileges();
shell.withPrivilige(() {
// execute code that requires root
});
```
…On Wed, Jan 24, 2024 at 8:37 AM Graciliano Monteiro Passos < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In README.md
<#6 (comment)>
:
> +certificate.
+
+
+You do this by passing in 'production: false' (the default) when creating
+the LetsEncrypt certificate.
+Staging certificates still have rate limits but they are much more generours
+
+```dart
+final LetsEncrypt letsEncrypt = LetsEncrypt(certificatesHandler, production: false);
+```
+
+
+## Permissions
+On Linux you need to be root (sudo) to open a port below 1024. If you try
+to start your server with the default ports (80, 443) you will fail.
+
Also add a documentation for setcap to avoid execution as root:
Enabling the dart VM:
sudo setcap 'cap_net_bind_service=+ep' /usr/lib/dart/bin/dart
Enabling a self-executable (from dart compile exe your_tool.dart):
sudo setcap 'cap_net_bind_service=+ep' your_tool.exe
—
Reply to this email directly, view it on GitHub
<#6 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32ODLOFBPMV27STFJCJLYQAUSHAVCNFSM6AAAAABAMNOSE2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTQMZZHE3TIMRSHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Nice package! I usually avoid running server processes as root due to security risks. I recommend using |
Fair enough.
…On Thu, 25 Jan 2024, 6:58 am Graciliano Monteiro Passos, < ***@***.***> wrote:
Nice package!
I usually avoid running server processes as root due to security risks. I
recommend using setcap on the binary to enable the server to listen on
low ports. I don't think we should advise executing server processes as
root.
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAG32OB4762HTIUVYX2Y62TYQFRXTAVCNFSM6AAAAABAMNOSE2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBYHAZDIMZUGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
FYI: Preparing release and testing it in real projects: |
This is what I've done.
See what you think.