-
Notifications
You must be signed in to change notification settings - Fork 325
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
Federation: Provide a New Endpoint for Obtaining Classified Domains #1626
Conversation
…evic/fed-classified-domains
…evic/fed-classified-domains
- This is for the TeamFeatureClassifiedDomainsConfig type
…evic/fed-classified-domains
@smatting , should I also add an endpoint in Stern for classified domains, just like the app lock feature has one at wire-server/tools/stern/src/Stern/API.hs Line 352 in b757784
|
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.
I ran helm install --debug --dry-run wire-server .local/charts/wire-server -f hack/helm_vars/wire-server/values.yaml > output.yaml
using a valid kubernetes server config, which results in a final galley config of
#snippet from configmap of galley
galley:
config:
cassandra:
host: cassandra-ephemeral
replicaCount: 1
enableFederator: true
journal:
endpoint: http://fake-aws-sqs:4568
queue: integration-team-events.fifo
settings:
conversationCodeURI: https://kube-staging-nginz-https.zinfra.io/conversation-join/
enableIndexedBillingTeamMembers: true
featureFlags:
classifiedDomains:
config:
domains:
- example.com
status: enabled
legalhold: whitelist-teams-and-implicit-consent
sso: disabled-by-default
teamSearchVisibility: disabled-by-default
federationDomain: integration.example.com
which appears to be in line with what's in galley.integration.yaml.
Do integration tests pass locally?
test s "ValidateSAMLEmails" $ testSimpleFlag @'Public.TeamFeatureValidateSAMLEmails | ||
test s "ValidateSAMLEmails" $ testSimpleFlag @'Public.TeamFeatureValidateSAMLEmails, | ||
test s "Classified Domains (enabled)" testClassifiedDomainsEnabled, | ||
test s "Classified Domains (disabled)" testClassifiedDomainsDisabled |
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.
Can you test that when querying the GET /teams/{tid}/features
endpoint, the classified domains stuff is included as well?
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.
I performed a manual test:
curl -s http://localhost:8085/teams/b8509dc2-4b4e-4d2f-afd6-410666bbb464/features -H Z-User:c8b2bb6b-4980-4950-af5d-211d6cb951e9 | json_pp
{
"appLock" : {
"config" : {
"enforceAppLock" : false,
"inactivityTimeoutSecs" : 60
},
"status" : "enabled"
},
"classifiedDomains" : {
"config" : {
"domains" : [
"example.com"
]
},
"status" : "enabled"
},
"digitalSignatures" : {
"status" : "disabled"
},
"legalhold" : {
"status" : "disabled"
},
"searchVisibility" : {
"status" : "disabled"
},
"sso" : {
"status" : "disabled"
},
"validateSAMLemails" : {
"status" : "disabled"
}
}
(and got some user/team ids using select team, binding, creator from galley_test.team limit 10;
after make cqlsh
and picked IDs from a binding team)
Still, an integration test here would be nice.
test s "ValidateSAMLEmails" $ testSimpleFlag @'Public.TeamFeatureValidateSAMLEmails | ||
test s "ValidateSAMLEmails" $ testSimpleFlag @'Public.TeamFeatureValidateSAMLEmails, | ||
test s "Classified Domains (enabled)" testClassifiedDomainsEnabled, | ||
test s "Classified Domains (disabled)" testClassifiedDomainsDisabled |
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.
I performed a manual test:
curl -s http://localhost:8085/teams/b8509dc2-4b4e-4d2f-afd6-410666bbb464/features -H Z-User:c8b2bb6b-4980-4950-af5d-211d6cb951e9 | json_pp
{
"appLock" : {
"config" : {
"enforceAppLock" : false,
"inactivityTimeoutSecs" : 60
},
"status" : "enabled"
},
"classifiedDomains" : {
"config" : {
"domains" : [
"example.com"
]
},
"status" : "enabled"
},
"digitalSignatures" : {
"status" : "disabled"
},
"legalhold" : {
"status" : "disabled"
},
"searchVisibility" : {
"status" : "disabled"
},
"sso" : {
"status" : "disabled"
},
"validateSAMLemails" : {
"status" : "disabled"
}
}
(and got some user/team ids using select team, binding, creator from galley_test.team limit 10;
after make cqlsh
and picked IDs from a binding team)
Still, an integration test here would be nice.
…evic/fed-classified-domains
- The endpoint is /teams/:tid/features
@jschaul , I just added an integration test for the all features endpoint. |
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.
I think this good to merge since the 1 failing test is known to be unrelated.
no, applock is supposed to be configured only by team admins with the public endpoint |
…evic/fed-classified-domains
…evic/fed-classified-domains
The PR implements a new endpoint
GET /teams/:teamId/features/classifiedDomains
that fetches a list of classified domains. There is an internal endpoint equivalent.Checklist