Commit Graph
17345 Commits
Author SHA1 Message Date
jkatz01 5fa2550614 30259 - fix linux uninstall script (#30488)
I tested the uninstall script by:
- Making a new agent package and installing it
- Checking with `dpkg --get-selections | grep 'fleet'` that
fleet-osquery is installed
- Checking with `sudo systemctl list-units | grep 'orbit'` that
orbit.service is running
- Uninstalling the package with uninstall-fleetd-linux.sh
- Checking the above commands again to see that fleet-osquery and
orbit.service are uninstalled.

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.

- For Orbit and Fleet Desktop changes:
   - [x] Manual QA done on one Linux machine (Ubuntu 24 on HP laptop).
2025-07-01 17:50:47 -05:00
dependabot[bot] 84977b46d1 Bump pbkdf2 from 3.1.2 to 3.1.3 (#30268) 2025-07-01 16:36:09 -06:00
Harrison Ravazzolo cf3071c26d Fix typo in IdP guide (#30487) 2025-07-01 15:12:22 -07:00
Victor Lyuboslavsky 8640a11368 Added Juan to product-groups.md (#30489) 2025-07-01 15:57:45 -06:00
Robert Fairburn 59051baa9d Add dale to infra codeowners (#30479) 2025-07-01 16:14:33 -05:00
Sam Pfluger eb471a097f Fix issue template link (#30484) 2025-07-01 16:11:46 -05:00
Juan Fernandez c0dae08549 27905: Specify TLS Server cert path when running orbit shell (#30329)
For #27905 

Provide TLS Server cert path via --tls_server_certs flag when running orbit shell.
2025-07-01 14:36:52 -04:00
Magnus Jensen 3eadc66bf7 Add Magnus to product group and humans list (#30457)
Add myself to the product groups page and the list of humans, as
specified in the onboarding.
2025-07-01 20:27:07 +02:00
Mitch Francese 29364c4b97 Add myself to the list of humans (#30450)
Added myself to the list of humans
2025-07-01 14:19:52 -04:00
Eric 9adc1d1829 Website: Update homepage cards to look more clickable. (#30466)
Closes: #30420

Changes:
- Updated the product category cards on the homepage.
2025-07-01 12:51:57 -05:00
Eric b1f84485ee Website: add HTML attributes to dropdown menu options (#30438)
Closes: https://github.com/fleetdm/confidential/issues/11169

Changes:
- Added HTML attributes to dropdown menu options to make it easier to
see what options users picked in Hotjar.
2025-07-01 12:46:18 -05:00
Mitch Francese df23be3c02 Updating Firefox to 140.0.2 (#30468)
Updated macOS policy and software deployment for Firefox to 140.0.2
2025-07-01 13:46:08 -04:00
RachelElysiaandIan Littman 933909f489 Fleet UI: VPP command copy includes command verification nuance (#30431)
## Issue
Closes #29893 

## Description
- Update text for VPP command for pending_install and failed_install to
include verification nuance
- Add related tests

## Note
- Original PR pointing to `vpp-verify-followup` but should be repointed
to `main` once that branch is merged in


# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] Added/updated automated tests
- [ ] Manual QA for all new/changed functionality

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2025-07-01 12:07:13 -05:00
Luke Heath e9517ee575 Fix date of release in article (#30440) 2025-07-01 12:04:03 -05:00
Tim Lee 0dde33d6b4 New tool: software package uploader (#30417) 2025-07-01 10:35:56 -06:00
Gabriel Hernandez e470a1ea22 Add ability to upload EULA via gitops (#30332)
relates to [#28691](https://github.com/fleetdm/fleet/issues/28691)

This adds the ability to upload the EULA users see during the setup
experience via gitops. It follows patterns used for uploading the
bootstrap package via gitops.

I've also added a sha256 column to the `eulas` table in order to easily
compare the existing eula with a new one to see if we need to perform an
upload.

Finally I added the support to generate this new gitops setting with the
`generate-gitops` command


- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] If database migrations are included, checked table schema to
confirm autoupdate
- For new Fleet configuration settings
- [x] Verified that the setting can be managed via GitOps, or confirmed
that the setting is explicitly being excluded from GitOps. If managing
via Gitops:
- [x] Verified that the setting is exported via `fleetctl
generate-gitops`
- [x] Added the setting to [the GitOps
documentation](https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485)
- [x] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
- [x] Verified that any relevant UI is disabled when GitOps mode is
enabled
- For database migrations:
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-07-01 17:28:13 +01:00
Konstantin SykulevandIan Littman f008d72107 available_for_install false hides uninstalled software (#30404)
https://github.com/fleetdm/fleet/issues/30188

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
2025-07-01 11:08:15 -05:00
Jorge Falcon 93279befef Incrementing Helm chart (6.6.8) and Fleet version in Helm chart (4.70.0) (#30454)
- Incrementing Helm chart to 6.6.8
- Incrementing Fleet version to 4.70.0 in Helm chart
2025-07-01 11:20:52 -04:00
Jahziel Villasana-Espinoza 4c5432c7eb vpp verify followup (#30389)
> Fixes #29851
> Fixes #29902
> Mainly followups from https://github.com/fleetdm/fleet/pull/30295,
plus improved integration testing

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [x] Added/updated automated tests
- [x] Manual QA for all new/changed functionality
2025-07-01 11:19:42 -04:00
Jacob Burley a5691d8f0a Specify binary-identifier when signing fleetctl for macOS (#30374)
This PR specifies a binary identifier for `fleetctl` on macOS, which
resolves the codesignature testing issue from #30352.

# Tests
To test this, I unsigned an affected version of `fleetctl`:
```shell
codesign --remove-signature fleetctl
```

I then installed `rcodesign` 0.29.0, and signed the binary myself, with
the added `--binary-identifier` flag:
```shell
./rcodesign sign --p12-file Certificates.p12 --p12-password-file=.p12_password --for-notarization --binary-identifier com.fleetdm.fleetctl fleetctl
```

Then, I obtained the codesigning requirement from my newly signed
binary:
```shell
$ codesign -d -r- fleetctl                                                                   
Executable=/Users/jacob.burley/Downloads/fleetctl_v4.67.3_macos/fleetctl
designated => identifier "com.fleetdm.fleetctl" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "XXXXXXXXXX"
```

I then tested the code signature with the designated requirement given:
```shell
$ codesign --test-requirement='=identifier "com.fleetdm.fleetctl" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = "XXXXXXXXXX"' --verbose=2 --verify fleetctl
fleetctl: valid on disk
fleetctl: satisfies its Designated Requirement
fleetctl: explicit requirement satisfied
```

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
2025-07-01 10:38:15 -04:00
Mitch Francese 7957a44c98 Add myself to Solutions Consultants (#30449)
Added myself to the Solutions Consultant section
2025-07-01 09:38:12 -05:00
Mohamed Aziz Khayati 324a40d28c Support more helm environment variables (#30451)
## Summary
This PR adds support for Windows MDM WSTEP (Simple Certificate
Enrollment Protocol) identity certificates and fixes S3 configuration
for carving and software installers in the Fleet Helm chart.

## Changes

### Windows MDM WSTEP Support
- **Deployment Template (`charts/fleet/templates/deployment.yaml`)**:
- Added `FLEET_MDM_WINDOWS_WSTEP_IDENTITY_CERT_BYTES` environment
variable
- Added `FLEET_MDM_WINDOWS_WSTEP_IDENTITY_KEY_BYTES` environment
variable
- Both variables load certificate data from Kubernetes secrets using
`valueFrom.secretKeyRef`
- Added conditional logic to only set variables when
`fleet.mdm.windows.wstepIdentityCertKey` is non-empty

- **Values Configuration (`charts/fleet/values.yaml`)**:
  - Added `fleet.mdm.windows.wstepIdentityCertKey: ""` configuration key
  - Added `fleet.mdm.windows.wstepIdentityKeyKey: ""` configuration key
  - Both default to empty strings for backward compatibility

### S3 Configuration Fixes
- **Fixed S3 support for custom buckets**: Added support for S3 Endpoint
URL & Force S3 Path style environemtal variables.
- **Added S3 support for software installers**: Added complete S3
configuration structure under `fleet.softwareInstallers.s3`

## Configuration

### Windows MDM WSTEP
```yaml
fleet:  # New
  mdm:
    windows:
      wstepIdentityCertKey: "wstep-identity-cert"  # Secret key containing the certificate
      wstepIdentityKeyKey: "wstep-identity-key"    # Secret key containing the private key
  
fleet:
  carving:
    s3:
      ...
      endpointURL: ""  # New
      forceS3PathStyle: false  # New

  softwareInstallers: # New
    s3:
      bucketName: "fleet-installers-bucket"
      prefix: "installers/"
      accessKeyID: "your-access-key"
      secretKey: "software-installers"
      endpointURL: ""
      forceS3PathStyle: false
      stsAssumeRoleARN: ""
```
2025-07-01 10:19:37 -04:00
Mitch Francese 306b1e8dec Fix URL under Spending Company Money (#30444) 2025-07-01 01:19:08 -05:00
Sam Pfluger 413b260e05 Update onTargetEarnings (#30446) 2025-06-30 23:32:14 -05:00
Sam Pfluger 0a7e9c3580 Add solutions specialist (#30445) 2025-06-30 22:50:53 -05:00
Juan Fernandez 33ae39aee0 29619: Validate required default.yml on gitops run (#30360)
For #29619 

When running gitops validate that default.yml is provided if scripts are
specified in the no-team.yml artifact.
2025-06-30 21:04:37 -04:00
Luke Heath 621b108a49 Add Entra ID to 4.70.0 release article (#30442) 2025-06-30 17:01:14 -06:00
jacobshandlingandJacob Shandling 0f94a718d9 UI: Improve names, cleanup unused imports (#30434)
Side quest while doing feature work

---------

Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
2025-06-30 16:00:22 -07:00
Irena ReedyandMike Thomas 5918db1b7a Update one-agent-fewer-tools-fewer-gaps.md (#30321)
Changed capitalizations and put two spaces for the heading

---------

Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
2025-07-01 07:54:49 +09:00
Lucas Manuel RodriguezandEric bf8a862d70 Microsoft Compliance Partner guide (#29877)
For #27044.

---------

Co-authored-by: Eric <eashaw@sailsjs.com>
2025-06-30 16:34:11 -06:00
George Karr d2370fc520 Update README.md (#30437) 2025-06-30 16:50:54 -05:00
Noah TalermanandGeorge Karr b6cdb516ca Release article: 4.70.0 (#30342)
TODO before merge:
- @lukeheath: "Changes" section

---------

Co-authored-by: George Karr <georgekarrv@users.noreply.github.com>
2025-06-30 16:50:15 -05:00
github-actions[bot]andlucasmrod d95ee8c3f0 Update versions of fleetd components in Fleet's TUF [automated] (#30436)
Automated change from [GitHub
action](https://github.com/fleetdm/fleet/actions/workflows/fleetd-tuf.yml).

Co-authored-by: lucasmrod <lucasmrod@users.noreply.github.com>
2025-06-30 18:43:21 -03:00
54c3361bc1 Docs v4.70.0 (#30432)
Documentation changes for the 4.70.0 release.

---------

Co-authored-by: Ian Littman <iansltx@gmail.com>
Co-authored-by: Noah Talerman <47070608+noahtalerman@users.noreply.github.com>
Co-authored-by: Victor Lyuboslavsky <victor.lyuboslavsky@gmail.com>
Co-authored-by: Martin Angers <martin.n.angers@gmail.com>
Co-authored-by: Scott Gress <scottmgress@gmail.com>
2025-06-30 16:33:32 -05:00
Dante Catalfamo 77f2a25fda Add api_only key to activities API (#30353)
#28502
2025-06-30 16:49:04 -04:00
Lucas Manuel Rodriguez 404f0d3ac0 Migrate from aws-sdk-go v1 to v2 (#30308)
#29482

[Migrate to the AWS SDK for Go
v2](https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/migrate-gosdk.html)
documents how to migrate codebases.

QA on features that use AWS SDK Go:
- Bootstrap package:
  - upload:  
  - download: 
  - cleanup: 
- Software (upload, download, installation, etc.) 
  - Cloudfront: Luckly, this feature was already using aws-sdk-go-v2.
- Carves 
- Logging:
	- Firehose 
	- Kinesis 
- Lambda  (tested result logs to a lambda function on our AWS Dogfood
account)
- Email:
	- Amazon SES TODO ⚠️ (this is what Dogfood uses and a few customers)
- We cannot easily test locally, we can use dogfood or load testing
(AWS) environments.

---

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [ ] Manual QA for all new/changed functionality
2025-06-30 17:45:39 -03:00
Scott Gress 05108066ba Add cron job to update host vitals label membership every 5 minutes (#30330)
# Details

This PR adds on to the https://github.com/fleetdm/fleet/pull/30278 which
added support for host vitals labels, by adding a cron job which updates
host vitals label membership every 5 minutes.

Unlike "dynamic" label types, where the hosts determine membership
themselves and report their decision to Fleet when they check in, "host
vitals" label membership is determine by Fleet. This means they can be
applied to hosts which don't check in at the `/distributed/write`
endpoint (like mobile devices).

The mechanism in the cron job is pretty naïve, it just lists all the
labels, post-filters for "host vitals" labels and updates membership for
each. Since the # of labels on an instance tends not to be excessive,
and since updating membership consists of one `DELETE` query and one
`INSERT...SELECT` query, this is not expected to contribute significant
load, but load testing should verify this.

# Checklist for submitter

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] Added/updated automated tests
- [X] Manual QA for all new/changed functionality

# Testing

Tested by manually adding scim groups, users etc. in the db and adding a
couple of new host vitals labels using the API. I've uploaded a folder
containing a db snapshot and creds to [Google Drive](
https://drive.google.com/drive/folders/1pDlg2XtS139d3sxq9iFqFs6vez8LeUgg?usp=sharing).
To use it, create a new folder
`~/.fleet/snapshots/test_host_vitals_labels`, download the `db.sql.gz`
file into it, then do `fdm restore --prep` and select
"test_host_vitals_labels". After starting the server you can trigger the
new job using `fleetctl trigger --name host_vitals_label_membership` or
wait five minutes.

New automated tests were added for a small change to the `GetLabels()`
method, and for the new cron job. Tests for other functionality were
added in https://github.com/fleetdm/fleet/pull/30278.
2025-06-30 13:00:55 -05:00
RachelElysia 8fc1468d37 Fleet UI: Host details > Software > Library statuses clickable, add software button (#30318) 2025-06-30 13:26:01 -04:00
jacobshandling 48ea14abbd UI: Labels by IdP (#30368) 2025-06-30 10:05:03 -07:00
Scott Gress 1227900d7b Update dev license (#30426)
See https://fleetdm.slack.com/archives/C062D0THVV1/p1751296223244699
2025-06-30 12:00:01 -05:00
Ian Littman fdc0c0b92d Clarify GitOps changes checkboxes in story template (#30411)
Also swaps some items to TODO so it's easier to search for "TODO" to
spot when a story isn't fully filled out.
2025-06-30 11:17:36 -05:00
d4ef39c673 Update Fleet-maintained apps (#30334)
Automated ingestion of latest Fleet-maintained app data.

Co-authored-by: mostlikelee <16102903+mostlikelee@users.noreply.github.com>
Co-authored-by: Janis Watts <184028114+jmwatts@users.noreply.github.com>
2025-06-30 10:51:02 -05:00
Sarah Gillespie 0239933d07 Expand integration tests for iOS refetch (#30341) 2025-06-30 10:22:07 -05:00
Lucas Manuel Rodriguez 2d5ef59bf3 PR review changes from main IdP department PR (#30418)
Addressing comments on main
[PR](https://github.com/fleetdm/fleet/pull/30375) for #29609.
2025-06-30 12:18:06 -03:00
Lucas Manuel Rodriguez 33b1596763 Make profile deployment fail if use has no department (#30423)
For #29609.

From @marko-lisica:

> In #23900 we decided to error if $FLEET_VAR_HOST_END_USER_IDP_GROUPS
or $FLEET_VAR_HOST_END_USER_IDP_USERNAME is added to a profile and the
host doesn't have a username or groups assigned to it. We decided that
because we think that if user deploys profile with variables above then
user would expected that host have some value for those. I think we
should be consistent with departments.

Context:
https://fleetdm.slack.com/archives/C084F4MKYSJ/p1751281745736999?thread_ts=1751025745.430259&cid=C084F4MKYSJ.
2025-06-30 12:08:36 -03:00
Scott Gress af2de5bc42 Add support for host vitals labels (#30278)
# Details

This PR adds support for a new label membership type, `host_vitals`.
Membership for these labels is based on a database query created from
user-supplied criteria. In this first iteration, the allowed criteria
are very simple: a label can specify either an IdP group or IdP
department, and hosts with linked users with a matching group or
department.

Groundwork is laid here for more complex host vitals queries, including
`and` and `or` logic, different data types and different kinds of vitals
(rather than just the "foreign" vitals of which IdP is an example).

Note that this PR does _not_ include the cron job that will trigger
membership updating, and it doesn't include ; for sake of simplicity in
review that will be done in a follow-on PR.

## Basic flow

### Creating a host vitals label

1. A new label is created via the API / GitOps with membership type
`host_vitals` and a `criteria` property that's a JSON blob. Currently
the JSON can only contain `vital` and `value` keys (and must contain
those keys)
2. The server validates that the specified `vital` exists in our [set of
known host
vitals](https://github.com/fleetdm/fleet/pull/30278/files#diff-b6d4c48f2624b82c2567b2b88db1de51c6b152eeb261d40acfd5b63a890839b7R418-R436).
3. The server validates that the [criteria can be parsed into a
query](https://github.com/fleetdm/fleet/pull/30278/files?diff=unified&w=1#diff-4ac4cfba8bed490e8ef125a0556f5417156f805017bfe93c6e2c61aa94ba8a8cR81-R86).
This also happens during GitOps dry run.
4. The label is saved (criteria is saved as JSON in the db)

### Updating membership for a host vitals label

1. The label's criteria is used to generate a query to run on the
_Fleet_ db.
1. For each vital criteria, check the vital type. Currently only foreign
vitals are supported.
   2. For foreign vitals, add its group to a set we keep track of.
3. Add a `WHERE` clause section for the vital and value, e.g.
`end_user_idp_groups = ?`
4. Once we have all the `WHERE` clauses, create the query as `SELECT %s
FROM %s` + any joins contributed by foreign vitals groups + `WHERE ` +
all the `WHERE` clauses we just calculated. The `%s` provide some
flexibility if we want to use these queries in other contexts.
2. Delete all existing label members
3. Do an `INSERT...SELECT` using the query we calculated from the label
criteria. The query will be `SELECT <label id> as label_id, hosts.id
FROM hosts JOIN ...`

## Future work

### Domestic vitals

These can be anything that we already store in the `hosts` table.
Domestic vitals won't add any `JOIN`s to the calculated label query, and
will simply be e.g. `hosts.hostname = ?`

### Custom vitals

We currently support an `additional_queries` config that will cause
other queries to run on hosts. The data returned from these queries is
stored in a `hosts_additional` table as a JSON blob. We can use MySQL
JSON functions to match values in this data, e.g.
`JSON_EXTRACT(host_additional, `$.some_custom_vital`) = ?`

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [ ] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
> I'll add the changelog item when I add the cron job PR
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] If database migrations are included, checked table schema to
confirm autoupdate
- For new Fleet configuration settings
- [X] Verified that the setting can be managed via GitOps, or confirmed
that the setting is explicitly being excluded from GitOps. If managing
via Gitops:
- [X] Verified that the setting is exported via `fleetctl
generate-gitops`
- [X] Verified that the setting is cleared on the server if it is not
supplied in a YAML file (or that it is documented as being optional)
- For database migrations:
- [X] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [X] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [X] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [X] Added/updated automated tests
- [X] Manual QA for all new/changed functionality
2025-06-30 09:58:58 -05:00
Martin Angers 639cbb510b Prevent starting browser in fleetctl preview (#30424) 2025-06-30 10:41:42 -04:00
Martin Angers 3d9fff19a1 DCLK: make user-scoped profiles pending immediately (not after user-channel is created) (#30276) 2025-06-30 09:22:34 -04:00
5d0209e53d Kubernetes deploy guide updates (#30132)
Updated Kubernetes deploy guide
- Now includes new Kubernetes deployment instructions using Helm and
Terraform
- Added details for MySQL and Redis connection information when deployed
with Helm
- Added details for adding your Fleet Premium license
- Added details for enabling TLS

---------

Co-authored-by: Rachael Shaw <r@rachael.wtf>
Co-authored-by: Mike Thomas <78363703+mike-j-thomas@users.noreply.github.com>
2025-06-30 12:29:24 +09:00
Lucas Manuel Rodriguez 608f768dd7 Add support for IdP department to SCIM and add FLEET_VAR_HOST_END_USER_IDP_DEPARTMENT fleet variable (#30375)
#29609

Verified the changes with [Entra ID's
validator](https://scimvalidator.microsoft.com/) and adding the
department attribute to the tester:
<img width="1312" alt="Screenshot 2025-06-27 at 8 54 32 AM"
src="https://github.com/user-attachments/assets/45a5deb8-7c65-49df-b3e8-eb05bea11f6b"
/>
<img width="1312" alt="Screenshot 2025-06-27 at 8 54 21 AM"
src="https://github.com/user-attachments/assets/91b554b5-b0b9-4bb6-a0cf-4e3b40e6ce21"
/>

- Tested with Okta
- TODO: Test with Entra ID and Google Workspace.
- I decided to not fail profile deployment if a user has no department
because it's not a required attribute, instead the
`FLEET_VAR_HOST_END_USER_IDP_DEPARTMENT` will be replaced with the empty
string.

---

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files)
for more information.
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
- [X] If database migrations are included, checked table schema to
confirm autoupdate

(https://github.com/fleetdm/fleet/blob/main/docs/Configuration/yaml-files.md#L485)
- For database migrations:
- [X] Checked schema for all modified table for columns that will
auto-update timestamps during migration.
- [X] Confirmed that updating the timestamps is acceptable, and will not
cause unwanted side effects.
- [X] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).
- [X] Added/updated automated tests
- [X] Manual QA for all new/changed functionality
2025-06-29 15:23:03 -03:00