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

Add integration tests for OIDC authentication #801

Merged
merged 28 commits into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b27b789
Added base config file template
juanfont Sep 7, 2022
cb70d7c
Return the results on error
juanfont Sep 7, 2022
fca3805
Initial work on OIDC tests
juanfont Sep 7, 2022
5f384c6
Removed old code and minor changes
juanfont Sep 8, 2022
f33e3e3
Parse the OIDC login URL
juanfont Sep 8, 2022
71b7123
Minor change on the base config for OIDC
juanfont Sep 8, 2022
9c0cf45
OIDC integration tests working
juanfont Sep 8, 2022
41353a5
Added integration tests for OIDC on Makefile
juanfont Sep 8, 2022
5774b32
Include OIDC in the full execution
juanfont Sep 8, 2022
b2f3ffb
Run integration tests in Actions
juanfont Sep 8, 2022
99307d1
Update nix sum
juanfont Sep 8, 2022
3abca99
Add logs for issues in Actions
juanfont Sep 14, 2022
c21479c
Print docker network config
juanfont Sep 14, 2022
d83a28b
Merge branch 'main' into oidc-integration-testing
juanfont Sep 18, 2022
b117ca7
Added missing TLS key for testing
Sep 18, 2022
9c58395
Removed unused param after routes fix
Sep 18, 2022
1c267f7
Capture listen error on mockoidc
Sep 19, 2022
a3f18f2
Add internal mockoidc command
Sep 20, 2022
b3a53bf
Do not load the config for CLI mockoidc (and version)
Sep 20, 2022
2e97119
Added derp config to OIDC etc
Sep 20, 2022
1563d75
Use Headscale container to run mockoidc
Sep 20, 2022
7a171cf
Added sleep to workaround #814
Sep 20, 2022
083d2a8
Linting fixes
Sep 20, 2022
e87b470
Removed fmt.Println for linting
Sep 20, 2022
8aa0eef
Merge branch 'main' into oidc-integration-testing
juanfont Sep 20, 2022
95948e0
Added indication of workaround for #814
Sep 21, 2022
6953598
Return stderr too in ExecuteCommand
Sep 21, 2022
7092a3e
Merge branch 'oidc-integration-testing' of https://github.com/juanfon…
Sep 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions integration_test/etc_oidc/base_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
log_level: trace
acl_policy_path: ""
db_type: sqlite3
ephemeral_node_inactivity_timeout: 30m
node_update_check_interval: 10s
ip_prefixes:
- fd7a:115c:a1e0::/48
- 100.64.0.0/10
db_path: /tmp/integration_test_db.sqlite3
private_key_path: private.key
noise:
private_key_path: noise_private.key
listen_addr: 0.0.0.0:8443
server_url: https://headscale:8443
tls_cert_path: "/etc/headscale/tls/server.crt"
tls_key_path: "/etc/headscale/tls/server.key"
tls_client_auth_mode: disabled
22 changes: 22 additions & 0 deletions integration_test/etc_oidc/tls/server.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

-----BEGIN CERTIFICATE-----
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you create an issue to have all keys/certs used for testing generated at start? I dont like that we check them in, but its fine for this pr.

Copy link
Owner Author

Choose a reason for hiding this comment

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

MIIC8jCCAdqgAwIBAgIULbu+UbSTMG/LtxooLLh7BgSEyqEwDQYJKoZIhvcNAQEL
BQAwFDESMBAGA1UEAwwJaGVhZHNjYWxlMCAXDTIyMDMwNTE2NDgwM1oYDzI1MjEx
MTA0MTY0ODAzWjAUMRIwEAYDVQQDDAloZWFkc2NhbGUwggEiMA0GCSqGSIb3DQEB
AQUAA4IBDwAwggEKAoIBAQDqcfpToLZUF0rlNwXkkt3lbyw4Cl4TJdx36o2PKaOK
U+tze/IjRsCWeMwrcR1o9TNZcxsD+c2J48D1WATuQJlMeg+2UJXGaTGRKkkbPMy3
5m7AFf/Q16UEOgm2NYjZaQ8faRGIMYURG/6sXm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