# jamf/jamfconnect architecture

> Architecture diagram of the GitHub repository jamf/jamfconnect, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jamf/jamfconnect
- Repository: https://github.com/jamf/jamfconnect

## Overview

##### Main components of the system
- Configuration Profiles: Represented by the “configurations” folder. This includes subfolders for different versions (v1.X, v2.X), identity providers (Azure AD, Google, Okta, etc.), as well as specialized configuration types such as PPPC, actions, notifications, and hybrid settings.
- Extension Attributes: Divided into “built_in_extension_attributes” and “additional_extension_attributes”. These scripts are designed to capture data from the Jamf Connect state and feed it into Jamf Pro as inventory information.
- Jamf Connect Scripts: Found under the “scripts” directory, these are utility scripts that interact with Jamf Connect—triggering actions via URI schemas or executing system changes.
- Helper Tools: Under “helper_tools”, these utilities (including the “jamf_connect_logs_collection” and cloud-specific integrations for AWS, Azure, or Google Cloud Storage) assist with log collection and troubleshooting.
- Unified Logging: The “unified_logging” directory contains specialized logging scripts and utilities. This component is used for creating various Jamf Connect log outputs (for login window, menubar, unlock, etc.) to help with debugging.
- ZTNA Configuration: The “ztna” folder holds files related to Zero Trust Network Access, including endpoint and shared gateway IP address lists.

##### Relationships and interactions between these components
- The Configuration Profiles directly impact how Jamf Connect integrates with various identity providers. They are consumed by the Jamf Connect application on the client (macOS) and dictate authentication behaviors.
- Extension Attributes (both built-in and additional) interface with the macOS system via the Jamf Connect preference domain. They are used to deliver key inventory data back to Jamf Pro.
- Scripts and Helper Tools support operational tasks and troubleshooting. For example, scripts can trigger actions (like notifying users or resetting settings), while helper tools facilitate log collection and cloud integrations.
- Unified Logging gathers data generated by Jamf Connect components (like logins, authentication events, and errors) that can be used by administrators to diagnose issues.
- Although these components are mostly independent in their respective folder arrangements, they collectively support the effective deployment, configuration, and maintenance of Jamf Connect within an enterprise environment.

##### Important architectural patterns and design principles
- Modularity: The repository separates concerns into distinct areas (configurations, extension attributes, helper tools, etc.) making it easier to update specific aspects without affecting the entire system.
- Reusability and Customization: Configuration profiles include templates and examples for various identity providers. Similarly, extension attributes and scripts have clear separation (built-in versus additional) to support different use cases.
- Extensibility: With dedicated folders for helper tools and logs, the project is designed to be enhanced or integrated into larger systems (such as Jamf Pro deployments or cloud storage solutions).
- Documentation-Driven: Each component has its own README files, guiding users on proper configuration and usage.

##### Relevant technologies, frameworks, or libraries
- Shell Scripting (Bash): Used extensively in extension attribute scripts and various helper scripts.
- Configuration Profiles (plist and mobileconfig files): Employed for setting up the Jamf Connect environment and identity provider integrations.
- PDF Documentation: Present in the azure_conditional_access folder for guidance on conditional access configurations.
- Cloud Storage Integrations: Tools to push log data to AWS S3, Azure Files, and Google Cloud Storage.

##### Putting it all together
- Attach external systems such as Jamf Pro (for inventory data and configurations), identity providers (Azure, Google, etc.), and cloud services (AWS, Azure Files, Google Cloud Storage) to illustrate end-to-end flows.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Application
    JC["Jamf Connect (macOS Client)"]:::core

    %% External Systems
    JP["Jamf Pro Inventory/Reporting"]:::external

    subgraph "Identity Providers"
        AD["Azure AD"]:::idp
        G["Google"]:::idp
        O["Okta"]:::idp
    end

    subgraph "Cloud Storage Services"
        AW["AWS S3"]:::cloud
        AZ["Azure Files"]:::cloud
        GC["Google Cloud Storage"]:::cloud
    end

    %% Repository Resources
    CP["Configuration Profiles"]:::config
    EA1["Extension Attributes (Built-in)"]:::ext
    EA2["Extension Attributes (Additional)"]:::ext
    JCS["Jamf Connect Scripts"]:::script
    HT["Helper Tools"]:::helper
    UL["Unified Logging"]:::logging
    ZTNA["ZTNA Configuration"]:::ztna

    %% Data flows and relationships
    CP -->|"applyConfig"| JC
    JCS -->|"executeActions"| JC
    ZTNA -->|"configureAccess"| JC

    %% Jamf Connect interacts with Identity Providers
    JC -->|"integrates"| AD
    JC -->|"integrates"| G
    JC -->|"integrates"| O

    %% Extension Attributes reporting to Jamf Pro Inventory
    EA1 -->|"reportInventory"| JP
    EA2 -->|"reportInventory"| JP

    %% Helper Tools assisting logging and cloud integrations
    HT -->|"collectLogs"| UL
    HT ---|"sendLogs"| AW
    HT ---|"sendLogs"| AZ
    HT ---|"sendLogs"| GC

    %% Unified Logging supports debugging and reporting
    UL -->|"provideLogs"| JP

    %% Click Events
    click CP "https://github.com/jamf/jamfconnect/tree/main/configurations"
    click EA1 "https://github.com/jamf/jamfconnect/tree/main/built_in_extension_attributes"
    click EA2 "https://github.com/jamf/jamfconnect/tree/main/additional_extension_attributes"
    click JCS "https://github.com/jamf/jamfconnect/tree/main/scripts"
    click HT "https://github.com/jamf/jamfconnect/tree/main/helper_tools"
    click UL "https://github.com/jamf/jamfconnect/tree/main/unified_logging"
    click ZTNA "https://github.com/jamf/jamfconnect/tree/main/ztna"

    %% Styles
    classDef config fill:#ffdb99,stroke:#b58900,stroke-width:2px;
    classDef ext fill:#cce5ff,stroke:#2a7f62,stroke-width:2px;
    classDef script fill:#d6d6f5,stroke:#4e148c,stroke-width:2px;
    classDef helper fill:#e6ffe6,stroke:#3c763d,stroke-width:2px;
    classDef logging fill:#ffe6e6,stroke:#d43f3a,stroke-width:2px;
    classDef ztna fill:#fce8b2,stroke:#d58512,stroke-width:2px;
    classDef core fill:#fff2cc,stroke:#af7817,stroke-width:2px;
    classDef external fill:#e6ccff,stroke:#6a0dad,stroke-width:2px;
    classDef idp fill:#d0e9c6,stroke:#3c763d,stroke-width:2px;
    classDef cloud fill:#c6e2ff,stroke:#1f78b4,stroke-width:2px;
```
