Skip to content

chore: update multiple git providers docs #10017

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

Merged
merged 3 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions codersdk/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const (
FeatureTemplateRBAC FeatureName = "template_rbac"
FeatureUserRoleManagement FeatureName = "user_role_management"
FeatureHighAvailability FeatureName = "high_availability"
FeatureMultipleGitAuth FeatureName = "multiple_git_auth"
FeatureMultipleExternalAuth FeatureName = "multiple_external_auth"
FeatureExternalProvisionerDaemons FeatureName = "external_provisioner_daemons"
FeatureAppearance FeatureName = "appearance"
FeatureAdvancedTemplateScheduling FeatureName = "advanced_template_scheduling"
Expand All @@ -60,7 +60,7 @@ var FeatureNames = []FeatureName{
FeatureSCIM,
FeatureTemplateRBAC,
FeatureHighAvailability,
FeatureMultipleGitAuth,
FeatureMultipleExternalAuth,
FeatureExternalProvisionerDaemons,
FeatureAppearance,
FeatureAdvancedTemplateScheduling,
Expand Down Expand Up @@ -89,7 +89,7 @@ func (n FeatureName) Humanize() string {
// This method may disappear at any time.
func (n FeatureName) AlwaysEnable() bool {
return map[FeatureName]bool{
FeatureMultipleGitAuth: true,
FeatureMultipleExternalAuth: true,
FeatureExternalProvisionerDaemons: true,
FeatureAppearance: true,
FeatureWorkspaceBatchActions: true,
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/external-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Optionally, you can request custom scopes:
CODER_EXTERNAL_AUTH_0_SCOPES="repo:read repo:write write:gpg_key"
```

### Multiple git providers (enterprise)
### Multiple External Providers (enterprise)

Multiple providers are an Enterprise feature. [Learn more](../enterprise.md).

Expand Down
30 changes: 15 additions & 15 deletions docs/enterprise.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ Coder is free to use and includes some features that are only accessible with a
paid license. [Contact Sales](https://coder.com/contact) for pricing or
[get a free trial](https://coder.com/trial).

| Category | Feature | Open Source | Enterprise |
| --------------- | ------------------------------------------------------------------------------------ | :---------: | :--------: |
| Support | Email, Phone, Prioritization | ❌ | ✅ |
| Scale | [High Availability](./admin/high-availability.md) | ❌ | ✅ |
| Scale | [Multiple Git Providers](./admin/git-providers.md#multiple-git-providers-enterprise) | ❌ | ✅ |
| Scale | [Isolated Terraform Runners](./admin/provisioners.md) | ❌ | ✅ |
| Scale | [Workspace Proxies](./admin/workspace-proxies.md) | ❌ | ✅ |
| Governance | [Audit Logging](./admin/audit-logs.md) | ❌ | ✅ |
| Governance | [Browser Only Connections](./networking/#browser-only-connections-enterprise) | ❌ | ✅ |
| Governance | [Groups & Template RBAC](./admin/rbac.md) | ❌ | ✅ |
| Cost Control | [Quotas](./admin/quotas.md) | ❌ | ✅ |
| Cost Control | [Max Workspace Autostop](./templates/#configure-max-workspace-autostop) | ❌ | ✅ |
| User Management | [Groups](./admin/groups.md) | ❌ | ✅ |
| User Management | [Group & role sync](./admin/auth.md#group-sync-enterprise) | ❌ | ✅ |
| User Management | [SCIM](./admin/auth.md#scim) | ❌ | ✅ |
| Category | Feature | Open Source | Enterprise |
| --------------- | --------------------------------------------------------------------------------------------------- | :---------: | :--------: |
| Support | Email, Phone, Prioritization | ❌ | ✅ |
| Scale | [High Availability](./admin/high-availability.md) | ❌ | ✅ |
| Scale | [Multiple External Auth Providers](./admin/external-auth.md#multiple-external-providers-enterprise) | ❌ | ✅ |
| Scale | [Isolated Terraform Runners](./admin/provisioners.md) | ❌ | ✅ |
| Scale | [Workspace Proxies](./admin/workspace-proxies.md) | ❌ | ✅ |
| Governance | [Audit Logging](./admin/audit-logs.md) | ❌ | ✅ |
| Governance | [Browser Only Connections](./networking/#browser-only-connections-enterprise) | ❌ | ✅ |
| Governance | [Groups & Template RBAC](./admin/rbac.md) | ❌ | ✅ |
| Cost Control | [Quotas](./admin/quotas.md) | ❌ | ✅ |
| Cost Control | [Max Workspace Autostop](./templates/#configure-max-workspace-autostop) | ❌ | ✅ |
| User Management | [Groups](./admin/groups.md) | ❌ | ✅ |
| User Management | [Group & role sync](./admin/auth.md#group-sync-enterprise) | ❌ | ✅ |
| User Management | [SCIM](./admin/auth.md#scim) | ❌ | ✅ |

## Adding your license key

Expand Down
2 changes: 1 addition & 1 deletion enterprise/coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
codersdk.FeatureBrowserOnly: api.BrowserOnly,
codersdk.FeatureSCIM: len(api.SCIMAPIKey) != 0,
codersdk.FeatureHighAvailability: api.DERPServerRelayAddress != "",
codersdk.FeatureMultipleGitAuth: len(api.ExternalAuthConfigs) > 1,
codersdk.FeatureMultipleExternalAuth: len(api.ExternalAuthConfigs) > 1,
codersdk.FeatureTemplateRBAC: api.RBAC,
codersdk.FeatureExternalTokenEncryption: len(api.ExternalTokenEncryption) > 0,
codersdk.FeatureExternalProvisionerDaemons: true,
Expand Down
16 changes: 8 additions & 8 deletions enterprise/coderd/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func Entitlements(
db database.Store,
logger slog.Logger,
replicaCount int,
gitAuthCount int,
externalAuthCount int,
keys map[string]ed25519.PublicKey,
enablements map[codersdk.FeatureName]bool,
) (codersdk.Entitlements, error) {
Expand Down Expand Up @@ -161,8 +161,8 @@ func Entitlements(
if featureName == codersdk.FeatureHighAvailability {
continue
}
// Multiple Git auth has it's own warnings based on the number configured!
if featureName == codersdk.FeatureMultipleGitAuth {
// External Auth Providers auth has it's own warnings based on the number configured!
if featureName == codersdk.FeatureMultipleExternalAuth {
continue
}
feature := entitlements.Features[featureName]
Expand Down Expand Up @@ -200,23 +200,23 @@ func Entitlements(
}
}

if gitAuthCount > 1 {
feature := entitlements.Features[codersdk.FeatureMultipleGitAuth]
if externalAuthCount > 1 {
feature := entitlements.Features[codersdk.FeatureMultipleExternalAuth]

switch feature.Entitlement {
case codersdk.EntitlementNotEntitled:
if entitlements.HasLicense {
entitlements.Errors = append(entitlements.Errors,
"You have multiple Git authorizations configured but your license is limited at one.",
"You have multiple External Auth Providers configured but your license is limited at one.",
)
} else {
entitlements.Errors = append(entitlements.Errors,
"You have multiple Git authorizations configured but this is an Enterprise feature. Reduce to one.",
"You have multiple External Auth Providers configured but this is an Enterprise feature. Reduce to one.",
)
}
case codersdk.EntitlementGracePeriod:
entitlements.Warnings = append(entitlements.Warnings,
"You have multiple Git authorizations configured but your license is expired. Reduce to one.",
"You have multiple External Auth Providers configured but your license is expired. Reduce to one.",
)
}
}
Expand Down
14 changes: 7 additions & 7 deletions enterprise/coderd/license/license_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func TestEntitlements(t *testing.T) {
if featureName == codersdk.FeatureHighAvailability {
continue
}
if featureName == codersdk.FeatureMultipleGitAuth {
if featureName == codersdk.FeatureMultipleExternalAuth {
continue
}
niceName := featureName.Humanize()
Expand Down Expand Up @@ -484,7 +484,7 @@ func TestEntitlements(t *testing.T) {
require.NoError(t, err)
require.False(t, entitlements.HasLicense)
require.Len(t, entitlements.Errors, 1)
require.Equal(t, "You have multiple Git authorizations configured but this is an Enterprise feature. Reduce to one.", entitlements.Errors[0])
require.Equal(t, "You have multiple External Auth Providers configured but this is an Enterprise feature. Reduce to one.", entitlements.Errors[0])
})

t.Run("MultipleGitAuthNotEntitled", func(t *testing.T) {
Expand All @@ -499,12 +499,12 @@ func TestEntitlements(t *testing.T) {
}),
})
entitlements, err := license.Entitlements(context.Background(), db, slog.Logger{}, 1, 2, coderdenttest.Keys, map[codersdk.FeatureName]bool{
codersdk.FeatureMultipleGitAuth: true,
codersdk.FeatureMultipleExternalAuth: true,
})
require.NoError(t, err)
require.True(t, entitlements.HasLicense)
require.Len(t, entitlements.Errors, 1)
require.Equal(t, "You have multiple Git authorizations configured but your license is limited at one.", entitlements.Errors[0])
require.Equal(t, "You have multiple External Auth Providers configured but your license is limited at one.", entitlements.Errors[0])
})

t.Run("MultipleGitAuthGrace", func(t *testing.T) {
Expand All @@ -515,17 +515,17 @@ func TestEntitlements(t *testing.T) {
GraceAt: time.Now().Add(-time.Hour),
ExpiresAt: time.Now().Add(time.Hour),
Features: license.Features{
codersdk.FeatureMultipleGitAuth: 1,
codersdk.FeatureMultipleExternalAuth: 1,
},
}),
Exp: time.Now().Add(time.Hour),
})
entitlements, err := license.Entitlements(context.Background(), db, slog.Logger{}, 1, 2, coderdenttest.Keys, map[codersdk.FeatureName]bool{
codersdk.FeatureMultipleGitAuth: true,
codersdk.FeatureMultipleExternalAuth: true,
})
require.NoError(t, err)
require.True(t, entitlements.HasLicense)
require.Len(t, entitlements.Warnings, 1)
require.Equal(t, "You have multiple Git authorizations configured but your license is expired. Reduce to one.", entitlements.Warnings[0])
require.Equal(t, "You have multiple External Auth Providers configured but your license is expired. Reduce to one.", entitlements.Warnings[0])
})
}
4 changes: 2 additions & 2 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.