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

Request TLS certificate for tailnet domain alias. #89

Closed
wants to merge 3 commits into from

Conversation

ananthb
Copy link

@ananthb ananthb commented Apr 9, 2022

Proposed Changes

Request TLS certificate from tailscale. HTTPS must be enabled for the tailnet.
https://tailscale.com/kb/1153/enabling-https/

Related Issues

#62

@lmagyar has an even easier solution in #137.

@ananthb
Copy link
Author

ananthb commented Apr 10, 2022

tailscale cert has to be run periodically to keep certs fresh. I can either run a background script from the post script, or start a cron daemon and use that. Any suggestions here?

Edit: created a new service that runs tailscale cert periodically.

@ananthb ananthb force-pushed the cert branch 7 times, most recently from 0f464bf to 6b2d6b7 Compare April 10, 2022 11:18
Copy link

@franzbischoff franzbischoff left a comment

Choose a reason for hiding this comment

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

Right!

  1. add ssl folder to the addon
  2. add options
  3. fetch new cert every day

👍

@ananthb
Copy link
Author

ananthb commented Apr 16, 2022

All three are done. The cert process runs once every 24 hours to fetch a new cert. The SSL folder is mapped rw and the cert files are copied into it. There is an option to enable the addon and another mandatory one for the tailnet domain name. There are two more options to customise the output path for the cert files. Both have defaults.

@franzbischoff
Copy link

franzbischoff commented Apr 16, 2022

The PR is failing because of the label?

Valid labels are: ['breaking-change', 'bugfix', 'documentation', 'enhancement', 'refactor', 'performance', 'new-feature', 'maintenance', 'ci', 'dependencies', 'translations']

@frenck
Copy link
Member

frenck commented Apr 16, 2022

The PR is failing because of the target name :-/

Its not.

@ananthb
Copy link
Author

ananthb commented Apr 17, 2022

Yes automation seems to expect a label but the PR is currently unlabeled. I don't have permission to label it either.

@frenck
Copy link
Member

frenck commented Apr 17, 2022

Yup, that is not a issue

@ananthb
Copy link
Author

ananthb commented Apr 18, 2022

@frenck so how do we proceed?

@frenck
Copy link
Member

frenck commented Apr 18, 2022

By having patience

@frenck frenck added the new-feature New features or options. label May 3, 2022
@ananthb
Copy link
Author

ananthb commented May 9, 2022

@frenck is this failure unexpected? I don't understand the error message.

@frenck
Copy link
Member

frenck commented May 9, 2022

is this failure unexpected?

Yes

I don't understand the error message.

OK... not sure what to do about that 🤷 It complains a label is missing, so that needs to be added by someone with permissions to do that.

@ananthb
Copy link
Author

ananthb commented May 10, 2022

I meant after you added the label, the amd64 build failed at a docker buildx step. I was wondering if i had to fix something but that doesn't appear to be the case.

tailscale/config.yaml Outdated Show resolved Hide resolved
tailscale/config.yaml Outdated Show resolved Hide resolved
tailscale/rootfs/etc/services.d/cert/run Outdated Show resolved Hide resolved
@ananthb ananthb requested a review from frenck June 14, 2022 12:21
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Jul 15, 2022
@nsiicm0
Copy link

nsiicm0 commented Jul 15, 2022

Please don’t let this PR go stale. Would like to see this feature implemented!

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Sep 30, 2022
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Oct 31, 2022
@ShadowJonathan
Copy link

(Still not stale)

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Nov 1, 2022
@github-actions
Copy link

github-actions bot commented Dec 2, 2022

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Dec 2, 2022
@ShadowJonathan
Copy link

(Not stale)

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Dec 3, 2022
@ananthb
Copy link
Author

ananthb commented Dec 16, 2022

@frenck this change is eagerly awaited by me and quite a few others it would seem. Any chance it gets merged soon?

If you don't want this, then tell us as much. It's pretty inconsiderate to just leave us hanging.

@ShadowJonathan
Copy link

ShadowJonathan commented Dec 16, 2022

Anecdotally, I'm also awaiting this change as I've moved over every homelab-hosted service to tailscale HTTPS a few months ago, save for Home Assistant, because of this PR's timeline. Currently I'm still using cloudflare and a port-forward instead.

@ananthb
Copy link
Author

ananthb commented Dec 29, 2022

For what it's worth, I've stopped using homeassistant entirely because of the petty handling of this change. I will keep this PR open until they decide to do something about it.

@lmagyar
Copy link
Contributor

lmagyar commented Jan 7, 2023

Until it is merged I forked the repo, updated it to Tailscale v1.34.2, and bumped the add-on base image also to v13.0.1.

And I merged this PR and made some modifications and bugfixes:

  • the Configuration option is certificate_tailnet_name (not domain_alias), it is more logical, it is analog to the tailscale cert <machine-name>.<tailnet-name>.ts.net command
  • it creates the /ssl/tailscale directory before fetching the cert
  • uses --statedir=/data instead of --state=/data/tailscaled.state, see Tailscale.sh: use --statedir instead of --state tailscale/tailscale-qpkg#64
  • fetch certificate on start and only within 1 week before expiration
  • modified the daemon finish script to the usual script, I know new add-ons have better, it can be bumped later with other scripts

See: https://github.com/lmagyar/homeassistant-addon-tailscale

Disclaimer: I'm just a tinkerer, and "it works on my machine..." (tested on armv7)

I will create some new PR-s soon.

@franzbischoff
Copy link

franzbischoff commented Jan 8, 2023 via email

@lmagyar
Copy link
Contributor

lmagyar commented Jan 8, 2023

Hi My domain is from the beginning and doesnt comply with your regex filter...
I use only letters and dashes for ex, and the regex fails...

Could you please send what is in your config? cert_domain: ?????

Maybe you entered the machine name also, like cert_domain: abcd.tail1234.ts.net, instead of only cert_domain: tail1234.ts.net

@franzbischoff
Copy link

I found that what you ask is the main domain: xyz.ts.net
I was trying the device subdomain: myha.xyz.ts.net

it works as it was :)
sorry

@github-actions
Copy link

github-actions bot commented Feb 9, 2023

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Feb 9, 2023
@sirreal
Copy link

sirreal commented Feb 11, 2023

I'm still hoping this progresses. Not stale.

@lmagyar
Copy link
Contributor

lmagyar commented Feb 11, 2023

I think #137 is a better solution, because that doesn't require any configuration and also provides a built-in proxy by tailscaled.

@ananthb
Copy link
Author

ananthb commented Feb 12, 2023

@lmagyar that does look better!

I'm not holding my breath waiting for either one to get merged though. The response from Nabu Casa is pretty clear now.

By having patience

@frenck this patient enough for you, or should we continue waiting forever?

Honestly this single issue has really turned me off of homeassistant. I'm a big believer in the spirit behind open source and Nabu Casa has shown absolutely none of that here. The community should really question their commitment to all of the projects they control.

@github-actions github-actions bot removed the stale There has not been activity on this issue or PR for quite some time. label Feb 12, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions.

@github-actions github-actions bot added the stale There has not been activity on this issue or PR for quite some time. label Mar 14, 2023
@github-actions github-actions bot closed this Mar 22, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
new-feature New features or options. stale There has not been activity on this issue or PR for quite some time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants