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

Added secret variables support for DDM. #24969

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

getvictor
Copy link
Member

@getvictor getvictor commented Dec 20, 2024

#24548 Adding secret variables support for DDM profiles.

Checklist for submitter

  • Added/updated tests
  • If database migrations are included, checked table schema to confirm autoupdate
  • For database migrations:
    • Checked schema for all modified table for columns that will auto-update timestamps during migration.
    • Ensured the correct collation is explicitly set for character columns (COLLATE utf8mb4_unicode_ci).
  • Manual QA for all new/changed functionality

@getvictor getvictor marked this pull request as ready for review December 20, 2024 22:16
@getvictor getvictor requested a review from a team as a code owner December 20, 2024 22:16
func Up_20241220114903(tx *sql.Tx) error {
_, err := tx.Exec(`
ALTER TABLE mdm_apple_declarations
CHANGE raw_json raw_json MEDIUMTEXT COLLATE utf8mb4_unicode_ci NOT NULL -- 16MB max size`)
Copy link
Member

Choose a reason for hiding this comment

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

In case the user substitutes the secret outside of a string I presume? Could you just add a small comment explaining that change for future reference?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, like:

  "Payload": {
    "RequireAlphanumericPasscode": true,
    "MinimumLength": $FLEET_SECRET_PASSCODE_LENGTH,

Copy link
Member

@dantecatalfamo dantecatalfamo left a comment

Choose a reason for hiding this comment

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

Looks splendid, have a happy holidays and see you in the new year!

@getvictor getvictor merged commit ad6d473 into main Dec 20, 2024
19 checks passed
@getvictor getvictor deleted the victor/24548-secrets-in-ddm-profiles branch December 20, 2024 22:32
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 63.57%. Comparing base (ad6edec) to head (7dc6ae2).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...tables/20241220114903_ChangeDDMJSONColumnToText.go 58.33% 4 Missing and 1 partial ⚠️
server/service/apple_mdm.go 20.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24969      +/-   ##
==========================================
- Coverage   63.58%   63.57%   -0.01%     
==========================================
  Files        1606     1607       +1     
  Lines      152219   152235      +16     
  Branches     3878     3878              
==========================================
- Hits        96785    96784       -1     
- Misses      47729    47742      +13     
- Partials     7705     7709       +4     
Flag Coverage Δ
backend 64.38% <47.05%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

2 participants