fleet/server
Victor Lyuboslavsky 7c9c5b9a2e
Okta SCEP endpoint (#34721)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or
remove if NA -->
**Related issue:** Resolves #34542

- Added SCEP endpoint for issuing certs for conditional access for Okta.
Functionally similar to host identity and Apple MDM SCEP endpoints.
- Changes file will be added later (this is a sub-task of the feature).
- A standard SCEP payload can be used to get a cert to an Apple device:

```
<!-- SCEP Configuration -->
<dict>
	<key>PayloadContent</key>
	<dict>
		<key>URL</key>
		<string>https://myfleet.example.com/api/fleet/conditional_access/scep</string>
		<key>Challenge</key>
		<string>ENROLLMENT_SECRET</string>
		<key>Keysize</key>
		<integer>2048</integer>
		<key>Key Type</key>
		<string>RSA</string>
		<key>Key Usage</key>
		<integer>5</integer>
              <key>ExtendedKeyUsage</key>
              <array>
                  <string>1.3.6.1.5.5.7.3.2</string>
              </array>
		<key>Subject</key>
		<array>
			<array>
				<array>
					<string>CN</string>
					<string>Fleet conditional access for Okta</string>
				</array>
			</array>
		</array>
		<key>SubjectAltName</key>
		<dict>
			<key>uniformResourceIdentifier</key>
			<array>
				<string>urn:device:apple:uuid:%HardwareUUID%</string>
			</array>
		</dict>
		<key>Retries</key>
		<integer>3</integer>
		<key>RetryDelay</key>
		<integer>10</integer>
              <!-- ACL for browser access -->
              <key>AllowAllAppsAccess</key>
              <true/>
              <!-- Set true for Safari access. Set false if Safari support not needed. -->
              <key>KeyIsExtractable</key>
              <false/>
	</dict>
	<key>PayloadDescription</key>
	<string>Configures SCEP for Fleet conditional access for Okta certificate</string>
	<key>PayloadDisplayName</key>
	<string>Fleet conditional access SCEP</string>
	<key>PayloadIdentifier</key>
	<string>com.fleetdm.conditional-access-scep</string>
	<key>PayloadType</key>
	<string>com.apple.security.scep</string>
	<key>PayloadUUID</key>
	<string>B2C3D4E5-F6A7-4B6C-9D8E-0F1A2B3C4D5E</string>
	<key>PayloadVersion</key>
	<integer>1</integer>
</dict>
```

# Checklist for submitter

## Testing

- [x] Added/updated automated tests
- [x] QA'd all new/changed functionality manually

## Database migrations

- [x] Ensured the correct collation is explicitly set for character
columns (`COLLATE utf8mb4_unicode_ci`).



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## New Features
* Adds Conditional Access SCEP certificate enrollment support, enabling
hosts to obtain device identity certificates through secure certificate
enrollment protocol endpoints.
* Implements rate limiting for certificate enrollment requests to
prevent abuse.

## Tests
* Adds comprehensive integration tests for Conditional Access SCEP
functionality, including certificate operations, rate limiting
validation, and edge cases.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-11-06 17:07:17 -06:00
..
archtest Basic Android MDM on/off functionality (#26309) 2025-02-18 09:43:11 -06:00
authz Hydrant CA Feature Branch (#31807) 2025-09-04 12:39:41 -04:00
aws_common Feat 1817 add iam auth to mysql and redis (#32488) 2025-09-04 10:08:47 -05:00
bindata
config Experimental fleet server config for custom updates & disk encryption settings (#34598) 2025-10-22 13:51:10 -04:00
contexts HTTP Message Signature Auth for certificate_request (#35139) 2025-11-06 12:06:00 -05:00
cron Add SCEP endpoint for host identity. (#30589) 2025-07-11 11:44:07 -03:00
datastore Okta SCEP endpoint (#34721) 2025-11-06 17:07:17 -06:00
errorstore Fixed potential panic in error handler when Redis is down. (#31643) 2025-08-06 17:14:31 +02:00
fleet Okta SCEP endpoint (#34721) 2025-11-06 17:07:17 -06:00
goose Add gosimple linter (#23250) 2024-10-29 14:17:51 -05:00
health 🧹 friday cleanup party: substitute deprecated import of go-kit (#19774) 2024-06-17 10:27:31 -03:00
launcher Add missing platform_like during orbit enrollment (#32671) 2025-09-05 16:05:19 -03:00
live_query Fix lingering live queries keys in Redis (#33928) 2025-10-08 06:36:38 -03:00
logging Update golangci-lint to v2.4.0 (#33251) 2025-09-22 13:17:11 -05:00
mail Fix STS assume role in aws-sdk-go v2 (#30699) 2025-07-10 13:00:27 -03:00
mdm DCSW: Allow Windows profiles to hit SCEP Proxy (#35041) 2025-11-06 11:14:49 -03:00
mock Okta SCEP endpoint (#34721) 2025-11-06 17:07:17 -06:00
policies Added Primo migration for failing policies automation. (#32515) 2025-09-04 10:12:27 -05:00
ptr Initial support for in-house apps on iOS/iPadOS (#34802) 2025-10-28 08:33:58 -04:00
pubsub Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
service Okta SCEP endpoint (#34721) 2025-11-06 17:07:17 -06:00
shellquote Updating golangci-lint to 1.61.0 (#22973) 2024-10-18 12:38:26 -05:00
sso End-user authentication for Window/Linux setup experience: backend (#34835) 2025-10-31 11:16:42 -05:00
test software display names: DB changes (#35066) 2025-11-04 10:04:42 -05:00
variables DCSW: Support all IDP variables in Windows config profiles (#34707) 2025-10-24 10:10:58 -03:00
version Move external dependency fleetdm/kolide-kit to monorepo (#15861) 2024-01-02 18:22:52 -03:00
vulnerabilities (releases on merge to main) Fix vuln false positives for "Logi Bolt.app" (#33920) 2025-10-27 16:55:30 -07:00
webhooks Added Primo migration for failing policies automation. (#32515) 2025-09-04 10:12:27 -05:00
websocket
worker Initial support for in-house apps on iOS/iPadOS (#34802) 2025-10-28 08:33:58 -04:00
utils.go Fix CleanupExpiredHosts to prevent deletion of DEP-assigned hosts (#28313) 2025-04-18 12:49:03 -05:00
utils_test.go feature: target profiles by labels (#16202) 2024-01-26 11:00:58 -05:00