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

website/integrations: Beszel #12905

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

nicedevil007
Copy link
Contributor

Details

Found a new tool that I tested and is able to use authentik for awesome login ;) Here is my guide.
For reference if you want to correct my english or just don't know what I wanted to describe without screenshots.
Here is the "default guide" found on the beszel homepage without the parts for authentik.

https://beszel.dev/guide/oauth


Checklist

  • Local tests pass (ak test authentik/)
  • The code has been formatted (make lint-fix)

If an API change has been made

  • The API schema has been updated (make gen-build)

If changes to the frontend have been made

  • The code has been formatted (make web)

If applicable

  • The documentation has been updated
  • The documentation has been formatted (make website)

@nicedevil007 nicedevil007 requested review from a team as code owners January 31, 2025 20:17
Copy link

netlify bot commented Jan 31, 2025

Deploy Preview for authentik-storybook canceled.

Name Link
🔨 Latest commit bcaea2e
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/67d4b13ca940c40008b7b6a7

Copy link

netlify bot commented Jan 31, 2025

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit bcaea2e
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/67d4b13c971f0500087fc3e2
😎 Deploy Preview https://deploy-preview-12905--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@nicedevil007 nicedevil007 changed the title Beszel website/integrations: Beszel Jan 31, 2025
Used these commands after fresh git pull:

make lint-fix && npx prettier --write ./website/integrations/services/beszel/index.mdx && make website


Signed-off-by: NiceDevil <[email protected]>
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.73%. Comparing base (7c944b9) to head (bcaea2e).
Report is 371 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12905      +/-   ##
==========================================
- Coverage   92.75%   92.73%   -0.03%     
==========================================
  Files         769      794      +25     
  Lines       38929    40425    +1496     
==========================================
+ Hits        36109    37487    +1378     
- Misses       2820     2938     +118     
Flag Coverage Δ
e2e 48.01% <ø> (-0.56%) ⬇️
integration 24.31% <ø> (-0.30%) ⬇️
unit 90.50% <ø> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@dominic-r dominic-r left a comment

Choose a reason for hiding this comment

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

This service utilizes Pocketbase as its backend. I believe it would be more beneficial to focus this PR on configuring authentik alongside Pocketbase, as it would support more use cases.

@dominic-r
Copy link
Contributor

dominic-r commented Jan 31, 2025

It would be more of a general purpose guide, then you could make a different page for Beszel, reference this guide, and add some service specific configuration. That's if you're up to it. Otherwise, I can review the PR as-is. Whatever works best for you. LMK what you prefer or if you have any questions/ideas. Just thinking long-term ATM

@nicedevil007
Copy link
Contributor Author

This service utilizes Pocketbase as its backend. I believe it would be more beneficial to focus this PR on configuring authentik alongside Pocketbase, as it would support more use cases.

I agree with you but I don't know how I can do that without the real tests beeing done. As you might know, I'm not that devguy that deploy own applications and use backends like pocketbase on developing ;)
If there is a pocketbase guide anytime in the future we could change the one from Beszel?

@dominic-r
Copy link
Contributor

This service utilizes Pocketbase as its backend. I believe it would be more beneficial to focus this PR on configuring authentik alongside Pocketbase, as it would support more use cases.

I agree with you but I don't know how I can do that without the real tests beeing done. As you might know, I'm not that devguy that deploy own applications and use backends like pocketbase on developing ;) If there is a pocketbase guide anytime in the future we could change the one from Beszel?

If that's what you prefer, sure. Tho, the UI the user is visiting (/_/#/collections?collection=pb_users_auth) is PB with the default auth table. There's not much to test that hasn't been tested with the configuration from the service.

@nicedevil007
Copy link
Contributor Author

ok, so I can do another PR for pocketbase, you take a look at it, if this is not going the right direction we stay to you "only" Beszel docs ok?

@dominic-r
Copy link
Contributor

I'll review the PR as-is for the moment. Thanks for yet another contribution to authentik. It is greatly appreciated.

@dominic-r
Copy link
Contributor

ok, so I can do another PR for pocketbase, you take a look at it, if this is not going the right direction we stay to you "only" Beszel docs ok?

If that works best for you

@nicedevil007
Copy link
Contributor Author

I can do it in parallel so maybe you will tell me "Nice...what are you trying to tell us with this guide..." and then this one is already close to be "merged" maybe :)

@dominic-r
Copy link
Contributor

Yea, that's perfect

@nicedevil007
Copy link
Contributor Author

Yea, that's perfect

I ask here, because no new PR right now => do you have any information about the automatic/manual usercreation with pocketbase?

Is this a feature Beszel added to it or is it always the same for this backend?

@dominic-r
Copy link
Contributor

Last I checked, under api rules of the user table you configure the creation rules.
IMG_1263

@nicedevil007
Copy link
Contributor Author

ok so I assume I can remove the part with the user creation from the guide at all, because we are using the docs in default state to get authentik up and running and not with user choosen details on each application ;)

@nicedevil007
Copy link
Contributor Author

so... I guess I'm done with the code for PocketBase... do you have an example for an already existing integration that relies on any other service that I can use as a template for Beszel?

Copy link
Contributor

@dominic-r dominic-r left a comment

Choose a reason for hiding this comment

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

Hi @nicedevil007, Thanks for yet another conribution to authentik! Real quick, could you also apply the same suggestions from the Pocketbase PR? I'll review the remaining changes once that's done.

As @4d62 suggestet, here is the much simpler version as it uses 1:1 settings from PocketBase
@nicedevil007
Copy link
Contributor Author

is here something missing from my side to get this PR merged?

@tanberry
Copy link
Contributor

tanberry commented Mar 5, 2025

is here something missing from my side to get this PR merged?

Hi, as always, I am playing catchup, sorry! @dominic-r what else is needed, if anything, for this PR?


## Preparation

Since Beszel uses PocketBase as its backend, you only need to replace the PocketBase placeholders with the placeholders found on this page.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to more clearly explain the dependencies between PB and Beszel. And, even though it is not great to have to duplicate content, I don't think we should ask readers to have to go read other docs (the PB docs). I'll make a pass at a compromise idea.. we can see how it looks.

Question: does a user have to also configure PB as part of this Beszel setup? Or if they already set up PB before, do they not need to do anything?

Copy link
Contributor Author

@nicedevil007 nicedevil007 Mar 6, 2025

Choose a reason for hiding this comment

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

You install Beszel and it already comes with Pocketbase installed as its backend, no need for separate setup steps to get Pocketbase Running.

First I did a Guide on only Beszel and the Suggestion was to create a seperate Pocketbase doc so wie can reference to this one because the setup will always be the same of Pocketbase is Süd as the backend.

So how to make it more easy for endusers... I Hope you have good idea 😁

Copy link
Contributor

Choose a reason for hiding this comment

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

oh oh, so two possibilities:

  • IF they already have integrated PB, they still have to also do these steps for Beszel (basically the same steps as for PB but diff FQDNs of course),

  • if they have not yet installed PB, and they want to install Beszel, then they DO NOT have to also install PB also. It will come with the PB integration.

Is this correct @nicedevil007 ? Thank you for your bravery and patience... :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is correct, I followed the comment here to split those up,. If I have to revert back to the only Beszel Docs without pocketbase I have to say sorry, we close this then and I don't know who I can trust on advices here anymore :(

#12905 (review)

Copy link
Contributor

@tanberry tanberry left a comment

Choose a reason for hiding this comment

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

Thanks as always @nicedevil007 for your contributions! This PR is a bit complex, because of the dependency with PocketBase. Take a look at my suggestions and let us know what you think.

nicedevil007 and others added 3 commits March 6, 2025 07:10
Co-authored-by: Tana M Berry <[email protected]>
Signed-off-by: NiceDevil <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
Signed-off-by: NiceDevil <[email protected]>
Co-authored-by: Tana M Berry <[email protected]>
Signed-off-by: NiceDevil <[email protected]>
@tanberry
Copy link
Contributor

Hi @nicedevil007 if it is ok with you I am going to pull in your PR and work on it locally, then push my changes as a PR into yours. ;-)

This is a complex one, and I want to make it clear that users don't have to install PB unless they want to.

@nicedevil007
Copy link
Contributor Author

Sure, no Problem at all. 👍

@tanberry
Copy link
Contributor

OK @nicedevil007 apologies for the complete reverse of earlier guidance from us, I went and added in all of the full steps for authentik configuration and Beszel configuration. It took me a bot to understand that Beszel and Pocketbook truly are independent enough that they need completely separate (even if 99% duplicated content) guides.

Please review especially the setps for the Beszel configuration. I used the steps from PB... please review URLs, etc.

I'm confident we will get this merged soon! Thank you again.

@dominic-r
Copy link
Contributor

@tanberry Took you a bot and me 🤣 anyways, nits (internal only): https://app.slack.com/archives/D08DJE7JYD7/p1741986741812229

- **Choose a Provider type**: OAuth2/OpenID
- **Configure the Provider**: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and any required configurations.
- Note the **Client ID**, **Client Secret**, and **slug** values because they will be required later.
- Set a `Strict` redirect URI to `https://pgadmin.company/oauth2/authorize`.
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
- Set a `Strict` redirect URI to `https://pgadmin.company/oauth2/authorize`.
- Set a `Strict` redirect URI to `https://beszel.company/oauth2/authorize`.

Copy link
Contributor

Choose a reason for hiding this comment

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

make sure you got the right redir url too and kbd/em please. see slack for corrected ver

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
- Set a `Strict` redirect URI to `https://pgadmin.company/oauth2/authorize`.
- Set a `Strict` redirect URI to <kbd>https://<em>beszel.company</em>/oauth2/authorize</kbd>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct one would be this https://beszel.company/api/oauth2-redirect
I hope my edit on the file was done correctly, never done a suggestion for edit of a file on github

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

Signed-off-by: NiceDevil <[email protected]>
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.

3 participants