Skip to content

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

Draft
afharo wants to merge 1 commit intoelastic:mainfrom
afharo:move-config-schema-to-server/stack_connectors
Draft

[Move @kbn/config-schema to server] stack_connectors#191864
afharo wants to merge 1 commit intoelastic:mainfrom
afharo:move-config-schema-to-server/stack_connectors

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 PR does not require backporting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// 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 Platform AppEx AI Infrastructure Team t// 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

💚 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
Contributor

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)

@afharo afharo marked this pull request as draft March 14, 2025 13:47
auto-merge was automatically disabled March 14, 2025 13:47

Pull request was converted to draft

@elasticmachine
Copy link
Contributor

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:AI Infra Platform AppEx AI Infrastructure Team t// Team:Defend Workflows “EDR Workflows” sub-team of Security Solution Team:Obs AI Assistant Observability AI Assistant Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// 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