-
Notifications
You must be signed in to change notification settings - Fork 25.3k
add MS Graph third party tests to periodic tests job #130380
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 MS Graph third party tests to periodic tests job #130380
Conversation
Pinging @elastic/es-security (Team:Security) |
boolean useFixture = false | ||
String msGraphTenantId = System.getenv("ms_graph_tenant_id") | ||
String msGraphClientId = System.getenv("ms_graph_client_id") | ||
String msGraphClientSecret = System.getenv("ms_graph_client_secret") | ||
String msGraphUsername = System.getenv("ms_graph_username") | ||
String msGraphGroupId = System.getenv("ms_graph_groupid") | ||
|
||
if (!msGraphTenantId || !msGraphClientId || !msGraphClientSecret || !msGraphUsername || !msGraphGroupId) { | ||
msGraphTenantId = "tenant-id" | ||
msGraphClientId = "client_id" | ||
msGraphClientSecret = "client_secret" | ||
msGraphUsername = "Thor" | ||
msGraphGroupId = "test_group" | ||
useFixture = true | ||
} |
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.
using a similar pattern to other third party tests
elasticsearch/modules/repository-azure/build.gradle
Lines 254 to 272 in e11d89d
boolean useFixture = false | |
String azureAccount = System.getenv("azure_storage_account") | |
String azureKey = System.getenv("azure_storage_key") | |
String azureContainer = System.getenv("azure_storage_container") | |
String azureBasePath = System.getenv("azure_storage_base_path") | |
String azureSasToken = System.getenv("azure_storage_sas_token") | |
String azureTenantId = System.getenv("azure_storage_tenant_id") | |
String azureClientId = System.getenv("azure_storage_client_id") | |
if (!azureAccount && !azureKey && !azureContainer && !azureBasePath && !azureSasToken) { | |
azureAccount = 'azure_integration_test_account' | |
azureKey = 'YXp1cmVfaW50ZWdyYXRpb25fdGVzdF9rZXk=' // The key is "azure_integration_test_key" encoded using base64 | |
azureContainer = 'container' | |
azureBasePath = '' | |
azureSasToken = '' | |
azureTenantId = '' | |
azureClientId = '' | |
useFixture = true | |
} |
"xpack.security.authc.realms.microsoft_graph.microsoft_graph1.graph_host", | ||
() -> graphFixture.getBaseUrl() + "/v1.0" | ||
) | ||
.setting("xpack.security.authc.realms.microsoft_graph.microsoft_graph1.access_token_host", graphFixture::getBaseUrl) |
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.
these settings have the correct default values, so the third party test shouldn't override them
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.
LGTM 👍
💔 Backport failed
You can use sqren/backport to manually backport by running |
Co-authored-by: elasticsearchmachine <[email protected]>
Add periodic tests for the new Entra ID/Microsoft Graph Authz plugin that use real credentials in the
azure2
test account. This will give us advance notice if Microsoft make any breaking changes to the APIs we're using.