Repository navigation
Add enterprise SSO (OIDC + SAML) for self-hosted deployments #146
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
Changes from all commits
f43d2c8
e537cd2
1b6bdf1
c160e63
fe57f40
83853b6
9899371
bc76491
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -379,7 +379,7 @@ TEST_PACKAGES := $(shell find . \ | |
| SECURITY_GOVULN_PACKAGES := $(filter-out ./scripts ./cmd/onboarding-pdf,$(TEST_PACKAGES)) | ||
|
|
||
| # Tests and packages that fail today, skipped until fixed. Remove a name once its test passes. | ||
| TESTALL_SKIP_TESTS := ^(TestAnalyticsPipelineFinalizeGivesUpAfterRepairFails|TestAnalyticsPipelineProducesExactCounts|TestAnalyticsPipelineProducesFacetedChart|TestAnalyticsPipelineProducesCSV|TestAnalyticsPipelineRepairsThenGivesUp|TestAnalyticsPipelineZeroRowsShortCircuits|TestBitbucketCommentHierarchyFromCapture|TestBuildFileCommentIndex|TestBuildFileCommentTree|TestChatBranchRejectsFabricatedJSON|TestCheckRequiredConfigCloudLiveLowPricingProfileRequiresLowPricingPlanIDs|TestCheckRequiredConfigCloudLiveModeRequiresLiveVars|TestCheckRequiredConfigCloudTestModeRequiresRazorpayTestVars|TestConvertAzureDevOpsCommentEvent_RealPayload|TestCountQueryBranchRejectsTruncatedJSON|TestCreateMonthlyPlan|TestDispatchClassifyFailureDegradesToChat|TestDispatchSwapsSystemPromptPerTurn|TestLawbookCarriesMachineContracts|TestListPaths|TestPostCommentReply_IssueCommentUsesIssueEndpoint|TestReconciliationSweepWorker_OnlyQueuesStaleRepositories|TestRoundTripUnifiedArtifact|TestShowCommentsPerFile|TestShowCommentsPerFileTree|TestShowCommentsPerFileTreeBitbucket|TestShowCommentsPerFileTreeGithub|TestShowCommentsPerFileTreeGitlab|TestSubscriptionIntegration|TestWebhookProcessing)$$ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info Tests were removed from the skip list, which implies that fixes have been implemented for these tests. Suggestions:
|
||
| TESTALL_SKIP_TESTS := ^(TestAnalyticsPipelineFinalizeGivesUpAfterRepairFails|TestAnalyticsPipelineProducesExactCounts|TestAnalyticsPipelineProducesFacetedChart|TestAnalyticsPipelineProducesCSV|TestAnalyticsPipelineRepairsThenGivesUp|TestAnalyticsPipelineZeroRowsShortCircuits|TestBitbucketCommentHierarchyFromCapture|TestChatBranchRejectsFabricatedJSON|TestCheckRequiredConfigCloudLiveLowPricingProfileRequiresLowPricingPlanIDs|TestCheckRequiredConfigCloudLiveModeRequiresLiveVars|TestCheckRequiredConfigCloudTestModeRequiresRazorpayTestVars|TestConvertAzureDevOpsCommentEvent_RealPayload|TestCountQueryBranchRejectsTruncatedJSON|TestCreateMonthlyPlan|TestDispatchClassifyFailureDegradesToChat|TestDispatchSwapsSystemPromptPerTurn|TestLawbookCarriesMachineContracts|TestPostCommentReply_IssueCommentUsesIssueEndpoint|TestReconciliationSweepWorker_OnlyQueuesStaleRepositories|TestSubscriptionIntegration|TestWebhookProcessing)$$ | ||
| TESTALL_SKIP_PKGS := . ./scripts ./cmd/onboarding-pdf ./internal/license/payment | ||
|
|
||
| .PHONY: testall | ||
|
|
@@ -390,6 +390,22 @@ testall: | |
| regen-risk-report: | ||
| python3 scripts/regen_risk_report.py | ||
|
|
||
| # Local/CI end-to-end SSO test against a real Keycloak (OIDC + SAML, see | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info A new end-to-end SSO test target has been added, which is beneficial for validating OIDC and SAML configurations. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info A new end-to-end SSO test target has been added, which utilizes Docker Compose and Keycloak. Suggestions:
|
||
| # docs/sso.md). Brings up Keycloak with the checked-in realm fixture, | ||
| # runs the headless cookie-jar e2e test, tears the container down either | ||
| # way (the `|| true` + explicit `down` guarantees cleanup even on failure). | ||
| .PHONY: test-sso-e2e | ||
| test-sso-e2e: | ||
| docker compose -f docker/docker-compose.sso-test.yml up -d keycloak | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The Keycloak service is being explicitly brought up, which is a good practice for managing dependencies. |
||
| @echo "Waiting for Keycloak to become healthy..." | ||
| @i=0; until docker compose -f docker/docker-compose.sso-test.yml ps keycloak --format json | grep -q "\"Health\":\"healthy\""; do \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info A robust health check for Keycloak has been implemented, which helps prevent race conditions during tests. |
||
| i=$$((i + 2)); \ | ||
| if [ $$i -ge 120 ]; then echo "Keycloak did not become healthy within 120s"; exit 1; fi; \ | ||
| sleep 2; \ | ||
| done | ||
| $(GOTEST) -tags=sso_e2e -count=1 -v ./internal/sso/... || (docker compose -f docker/docker-compose.sso-test.yml down -v; exit 1) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: critical Ensures that Keycloak is torn down even if the tests fail, which is critical for CI cleanup. Suggestions:
|
||
| docker compose -f docker/docker-compose.sso-test.yml down -v | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: critical Ensures that Keycloak is torn down after successful tests, which is critical for CI cleanup. Suggestions:
|
||
|
|
||
| .PHONY: security-govulncheck security-govulncheck-json security-osv security-gitleaks security-semgrep security-dependabot security-gh-secret-scanning security-triage | ||
|
|
||
| # Run Go vulnerability analysis for reachable vulnerabilities. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ import ( | |
|
|
||
| // TestListPaths tests loading a unified artifact and listing its diff paths | ||
| func TestListPaths(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gl_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gl_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -34,7 +34,7 @@ func TestListPaths(t *testing.T) { | |
|
|
||
| // TestShowCommentsPerFile tests showing comments organized by file | ||
| func TestShowCommentsPerFile(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gl_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gl_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -75,7 +75,7 @@ func TestShowCommentsPerFile(t *testing.T) { | |
|
|
||
| // TestBuildFileCommentIndex tests building the efficient file->comments index | ||
| func TestBuildFileCommentIndex(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gl_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gl_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -115,7 +115,7 @@ func TestBuildFileCommentIndex(t *testing.T) { | |
|
|
||
| // TestBuildFileCommentTree tests building the tree structure per file | ||
| func TestBuildFileCommentTree(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gl_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gl_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -158,7 +158,7 @@ func TestBuildFileCommentTree(t *testing.T) { | |
|
|
||
| // TestShowCommentsPerFileTree tests showing the tree structure | ||
| func TestShowCommentsPerFileTree(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gl_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gl_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -181,7 +181,7 @@ func TestShowCommentsPerFileTree(t *testing.T) { | |
|
|
||
| // TestShowCommentsPerFileTreeBitbucket tests with Bitbucket data that has threaded comments | ||
| func TestShowCommentsPerFileTreeBitbucket(t *testing.T) { | ||
| artifactPath := "../../../artifacts/bb_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/bb_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -230,7 +230,7 @@ func TestShowCommentsPerFileTreeBitbucket(t *testing.T) { | |
|
|
||
| // TestShowCommentsPerFileTreeGitlab tests with GitLab data | ||
| func TestShowCommentsPerFileTreeGitlab(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gl_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gl_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
@@ -280,7 +280,7 @@ func TestShowCommentsPerFileTreeGitlab(t *testing.T) { | |
|
|
||
| // TestShowCommentsPerFileTreeGithub tests with GitHub data | ||
| func TestShowCommentsPerFileTreeGithub(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gh_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gh_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ import ( | |
|
|
||
| // TestRoundTripUnifiedArtifact tests loading a saved UnifiedArtifact JSON back into the struct | ||
| func TestRoundTripUnifiedArtifact(t *testing.T) { | ||
| artifactPath := "../../../artifacts/gh_unified.json" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Severity: info The artifact path has been updated to reflect a file relocation. Suggestions:
|
||
| artifactPath := "../../../docs/raw/artifacts/gh_unified.json" | ||
|
|
||
| // Read the JSON file | ||
| data, err := os.ReadFile(artifactPath) | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
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.
Severity: info
Tests have been removed from the skip list, indicating that these tests are now passing or have become obsolete.
Suggestions: