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

[Move @kbn/config-schema to server] stack_connectors #191864

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

afharo
Copy link
Member

@afharo afharo commented Aug 30, 2024

Summary

Part of #189476.

We want to avoid @kbn/config-schema from leaking to the browser, and this plugin is using it outside the ./server directory.

I found that the UI only references this code via import type, so I don't expect it to have any impact on bundle metrics, but this PR is still useful to avoid potential future leaks.

For maintainers

@afharo afharo added technical debt Improvement of the software architecture and operational architecture release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Obs AI Assistant Observability AI Assistant Team:Security Generative AI Security Generative AI Team:AI Infra AppEx AI Infrastructure Team labels Aug 30, 2024
@afharo afharo requested review from a team as code owners August 30, 2024 16:16
@afharo afharo requested review from ashokaditya and parkiino August 30, 2024 16:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-defend-workflows (Team:Defend Workflows)

@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-ai-infra (Team:AI Infra)

@afharo afharo enabled auto-merge (squash) August 30, 2024 16:16
export type SecretsConfigurationType = TypeOf<typeof SecretConfigurationSchema>;
export type CAType = TypeOf<typeof AuthConfiguration.ca>;
export type VerificationModeType = TypeOf<typeof AuthConfiguration.verificationMode>;
export type {
Copy link
Member Author

Choose a reason for hiding this comment

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

Reexporting the types from common to avoid more changes in other parts of the code.


export const SecretConfigurationSchemaValidation = {
validate: (secrets: any) => {
Copy link
Member Author

Choose a reason for hiding this comment

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

any is flagged as an error in the server but not in common 😅

So I chose to remove it instead of skipping it.

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

SecretConfigurationSchemaValidation
);

export type HasAuth = TypeOf<typeof hasAuthSchema>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please preserve the initial file structure and keep these in a separate auth/types.ts? 🙏

Copy link
Member Author

Choose a reason for hiding this comment

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

ACK! I'm not sure if that'll defeat the purpose since the types are based on a runtime object. I'll play around with this to see if there's a more elegant way :)

Copy link
Contributor

@tomsonpl tomsonpl left a comment

Choose a reason for hiding this comment

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

Defend workflows - LGTM 🚀

@tomsonpl tomsonpl removed the request for review from parkiino September 26, 2024 13:33
@dgieselaar
Copy link
Member

Will leave review up to @elastic/security-generative-ai and @elastic/appex-ai-infra, don't want to approve for them (which IIUC will happen if I approve on behalf of obs-ai-assistant)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:AI Infra AppEx AI Infrastructure Team Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Obs AI Assistant Observability AI Assistant Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Team:Security Generative AI Security Generative AI technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants