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/docs: add . in https://netbird.company* #12166

Merged
merged 8 commits into from
Dec 5, 2024

Conversation

Marcus1Pierce
Copy link
Contributor

Details

From the documentation https://docs.netbird.io/selfhosted/identity-providers#authentik, the domain must have a . in https://netbird.company.* or you will experience a redirect error.


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)

From the documentation https://docs.netbird.io/selfhosted/identity-providers#authentik, the domain must have a . in https://netbird.company.* or you will experience a redirect error.

Signed-off-by: Marcus1Pierce <72237814+Marcus1Pierce@users.noreply.github.com>
@Marcus1Pierce Marcus1Pierce requested a review from a team as a code owner November 23, 2024 10:48
Copy link

netlify bot commented Nov 23, 2024

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit d984fa3
🔍 Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/6751e6d5bb824400089313b0
😎 Deploy Preview https://deploy-preview-12166--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.

Copy link

netlify bot commented Nov 23, 2024

Deploy Preview for authentik-storybook ready!

Name Link
🔨 Latest commit d984fa3
🔍 Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/6751e6d56fe02e0008e8b075
😎 Deploy Preview https://deploy-preview-12166--authentik-storybook.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.

@tanberry
Copy link
Contributor

Thanks for this PR @Marcus1Pierce ! So both the period (.) and the asterisk (*) needed to be added, for the Redirect URI, right?
Screenshot 2024-11-26 at 3 24 57 PM

@tanberry
Copy link
Contributor

tanberry commented Nov 26, 2024

Thanks for this PR @Marcus1Pierce ! So both the period (.) and the asterisk (*) needed to be added, for the Redirect URI, right? Screenshot 2024-11-26 at 3 24 57 PM

oh, wait, I see... it's the second line you corrected, the asterisk was already there, you added the period. Got it. Thanks so much!

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.70%. Comparing base (695de45) to head (d984fa3).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12166      +/-   ##
==========================================
+ Coverage   92.62%   92.70%   +0.07%     
==========================================
  Files         762      762              
  Lines       38152    38152              
==========================================
+ Hits        35338    35368      +30     
+ Misses       2814     2784      -30     
Flag Coverage Δ
e2e 49.10% <ø> (+0.11%) ⬆️
integration 24.76% <ø> (ø)
unit 90.22% <ø> (ø)

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.

Comment on lines 32 to 36
```
https://netbird.company
https://netbird.company*
https://netbird.company.*
http://localhost:53000
```
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
```
https://netbird.company
https://netbird.company*
https://netbird.company.*
http://localhost:53000
```
- Strict; https://netbird.company
- Regex; https://netbird.company/.*
- Strict; http://localhost:53000

I'm not sure about the 2nd entry in the list, but just having .* at the end would be an insecure configuration

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried with https://netbird.company/.* or https://netbird.company.* and it seems there are no issues. But if I don't add .* to the regex (ex. https://netbird.company/* or https://netbird.company*), for some reason, the Redirect URI Error always appears as shown in the image.

image

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, thanks @Marcus1Pierce for your patience. In the last release, we updated the Redirect URI fields such that you can select Strict or Regex format. So exactly as @BeryJu 's suggested change shows, we want users to indicate that it is Regex if they use the https://netbird.company/.* format.

Here's what that field looks like now:
Screenshot 2024-11-26 at 5 13 35 PM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tanberry I tried as suggested by @BeryJu and everything works fine.

image

Or as suggested on the website https://docs.netbird.io/selfhosted/identity-providers#authentik (all using regex) as below also works fine.

image

I don't know which is the best, but from what I tried, everything works fine.

Copy link
Member

Choose a reason for hiding this comment

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

Using all regex is insecure without escaping (which is why we added the configuration options for the comparison mode)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi again @Marcus1Pierce good to hear this works. Please make the change to the file with @BeryJu 's suggestion, run the linters again (make website), and push again, and then we can merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tanberry I have edited it again according to the suggestion by @BeryJu.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks @Marcus1Pierce , we're getting there. Can you please run make website again, and re-push? Our dependabot bumped the version of the linter we use, and this PR is failing on that check. NOTE: you might need to first run make website-install in order to update the build tools locally, then run make website. Then push to the PR again.

Let us know if any problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tanberry Sorry for the late update. I have tried running make website-install and then make website, but the following error occurred:

[ERROR] Error: Unable to build website for locale en.
    at tryToBuildLocale (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:78:15)
    at async /mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9
    ... 4 lines matching cause stack trace ...
    at async file:///mnt/d/Visual%20Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3 {
  [cause]: Error: Docusaurus found broken links!

  Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
  Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.

  Exhaustive list of all broken links found:
  - Broken link on source page path = /docs/add-secure-apps/flows-stages/flow/examples/flows:
     -> linking to /blueprints/example/flows-enrollment-2-stage.yaml
     -> linking to /blueprints/example/flows-enrollment-email-verification.yaml
     -> linking to /blueprints/example/flows-login-2fa.yaml
     -> linking to /blueprints/example/flows-login-conditional-captcha.yaml
     -> linking to /blueprints/example/flows-recovery-email-verification.yaml
     -> linking to /blueprints/example/flows-unenrollment.yaml
  - Broken link on source page path = /docs/users-sources/user/invitations:
     -> linking to /blueprints/example/flows-enrollment-2-stage.yaml

      at throwError (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/logger/lib/logger.js:80:11)
      at reportBrokenLinks (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:250:47)
      at handleBrokenLinks (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/server/brokenLinks.js:282:5)
      at executeBrokenLinksCheck (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:91:47)
      at /mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:70:67
      at Object.async (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/logger/lib/perfLogger.js:42:47)
      at buildLocale (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/buildLocale.js:70:31)
      at async runBuildLocaleTask (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:93:5)
      at async /mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:74:13
      at async tryToBuildLocale (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:70:9)
      at async /mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:34:9
      at async mapAsyncSequential (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/utils/lib/jsUtils.js:21:24)
      at async Command.build (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/build/build.js:33:5)
      at async Promise.all (index 0)
      at async runCLI (/mnt/d/Visual Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/lib/commands/cli.js:56:5)
      at async file:///mnt/d/Visual%20Studio/GitHub/Marcus1Pierce/authentik/website/node_modules/@docusaurus/core/bin/docusaurus.mjs:44:3
}
[INFO] Docusaurus version: 3.6.2
Node version: v18.19.1
make: *** [Makefile:250: website-build] Error 1

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!~

Oh. Oops, I just saw @BeryJu 's comment. Sorry, we will get back to this one...

@Marcus1Pierce Marcus1Pierce requested review from a team as code owners December 5, 2024 05:03
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 again @Marcus1Pierce sorry for the build drama. ;-)

.gitignore Outdated Show resolved Hide resolved
Signed-off-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
@rissson rissson removed request for a team December 5, 2024 17:46
@rissson rissson enabled auto-merge (squash) December 5, 2024 17:50
@rissson rissson merged commit 672ba72 into goauthentik:main Dec 5, 2024
65 of 66 checks passed
@Marcus1Pierce
Copy link
Contributor Author

@rissson @tanberry Sorry, it seems I made a mistake. In the regex, it should be https://netbird.company/.* instead of https://netbird.company/.\*. Could you please help to change it? Once again, I apologize for not checking it thoroughly. In the future, I will open issues instead of pull requests to prevent this from happening again. I'm really sorry. I am currently unable to open the editor to fix it.

@rissson
Copy link
Member

rissson commented Dec 6, 2024

No worries @Marcus1Pierce, mistakes happen. I just opened #12284 to fix this. Feel free to keep making PRs, they are always welcomed!

@tanberry
Copy link
Contributor

tanberry commented Dec 6, 2024

Yes, thank you again @Marcus1Pierce, we really appreciate the PRs, and I apologize for my messy handling of this one! As @rissson says, PRs are always welcome! Thanks again.

@Marcus1Pierce
Copy link
Contributor Author

Thank you @tanberry @rissson

kensternberg-authentik added a commit that referenced this pull request Dec 9, 2024
[Merge note: The two strings that were manually updated translate to, according to Google Translate:
"Evaluate the policies once the stage is presented to the user." (note the past tense)
"Evaluate the policies when the level is visible to the user." (note the ambiguous tense)

* main: (226 commits)
  website/docs: add page about the Cobalt pentest (#12249)
  core: bump aws-cdk-lib from 2.171.1 to 2.172.0 (#12296)
  website: bump aws-cdk from 2.171.1 to 2.172.0 in /website (#12295)
  core: bump sentry-sdk from 2.19.1 to 2.19.2 (#12297)
  core: bump coverage from 7.6.8 to 7.6.9 (#12299)
  core, web: update translations (#12290)
  root: fix override locale only if it is not empty (#12283)
  translate: Updates for file web/xliff/en.xlf in fr (#12276)
  core: bump twilio from 9.3.7 to 9.3.8 (#12282)
  website: bump path-to-regexp and express in /website (#12279)
  core: bump sentry-sdk from 2.19.0 to 2.19.1 (#12280)
  core: bump ruff from 0.8.1 to 0.8.2 (#12281)
  website/docs: fix lint (#12287)
  website/integrations: netbird: fix redirect URI regex (#12284)
  web: simplify `?inline` handler for Storybook (#12246)
  website/docs: Update Traefik middleware example to reflect latest version of Traefik (#12267)
  website/docs: add . in https://netbird.company* (#12166)
  core: bump goauthentik.io/api/v3 from 3.2024104.1 to 3.2024104.2 (#12263)
  core: bump pydantic from 2.10.2 to 2.10.3 (#12262)
  core: bump github.com/getsentry/sentry-go from 0.29.1 to 0.30.0 (#12264)
  ...
kensternberg-authentik added a commit that referenced this pull request Jan 8, 2025
* main:
  web: simplify `?inline` handler for Storybook (#12246)
  website/docs: Update Traefik middleware example to reflect latest version of Traefik (#12267)
  website/docs: add . in https://netbird.company* (#12166)
  core: bump goauthentik.io/api/v3 from 3.2024104.1 to 3.2024104.2 (#12263)
  core: bump pydantic from 2.10.2 to 2.10.3 (#12262)
  core: bump github.com/getsentry/sentry-go from 0.29.1 to 0.30.0 (#12264)
  core, web: update translations (#12268)
  website: bump @types/react from 18.3.12 to 18.3.13 in /website (#12269)
  website: bump prettier from 3.4.1 to 3.4.2 in /website (#12270)
  ci: bump actions/attest-build-provenance from 1 to 2 (#12271)
  core: bump golang.org/x/sync from 0.9.0 to 0.10.0 (#12272)
  core: bump django from 5.0.9 to 5.0.10 (#12273)
  core: bump webauthn from 2.3.0 to 2.4.0 (#12274)
  website/integrations: add The Lounge (#11971)
  core: bump python-kadmin-rs from 0.3.0 to 0.4.0 (#12257)
  root: fix health status code (#12255)
  ci: fix should_push always being false (#12252)
  web: bump API Client version (#12251)
  providers/oauth2: Add provider federation between OAuth2 Providers (#12083)
  website/integrations: mastodon: set correct uid field (#11945)
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.

4 participants