Skip to main content

GlobalProtect Tunnel Profiles Models

Overview

The GlobalProtect Tunnel Profiles models provide a structured way to manage tunnel settings for mobile users in Palo Alto Networks' Strata Cloud Manager. These models cover split tunneling configuration, authentication override cookies, and tunnel source restrictions. The models handle validation of inputs and outputs when interacting with the SCM API.

Models

The module provides the following Pydantic models:

  • TunnelProfileBaseModel: Base model with fields common to all tunnel profile operations
  • TunnelProfileCreateModel: Model for creating new tunnel profiles
  • TunnelProfileUpdateModel: Model for updating existing tunnel profiles (addressed by name)
  • TunnelProfileResponseModel: Response model for tunnel profile operations
  • AuthenticationOverride: Authentication override configuration
  • AcceptCookie: Accept cookie configuration for authentication override
  • CookieLifetime: Cookie lifetime bounds (days/hours/minutes)
  • SourceAddress: Source IP addresses and regions
  • SplitTunneling: Split tunneling routes, applications, and domains
  • SplitTunnelingDomains: Domain list container for include/exclude domains
  • SplitTunnelingDomainEntry: Single domain entry with optional ports
  • TunnelOperatingSystem: Enum for available operating systems

All request models use extra="forbid" configuration, which rejects any fields not explicitly defined in the model. The response model uses extra="ignore" to tolerate additional fields returned by the API.

Attributes

AttributeTypeRequiredDefaultDescription
namestrYesNoneName of the tunnel profile. Length: 1-31 chars
authentication_overrideAuthenticationOverrideNoNoneAuthentication cookie override configuration
no_direct_access_to_local_networkboolNoNoneDisable direct access to the local network
osList[TunnelOperatingSystem]NoNoneOperating systems the profile applies to
retrieve_framed_ip_addressboolNoNoneRetrieve framed IP address from the authentication server
source_addressSourceAddressNoNoneSource IP addresses and regions
source_userList[str]NoNoneSource users the profile applies to
split_tunnelingSplitTunnelingNoNoneSplit tunneling configuration

The response model additionally exposes folder (Optional[str]) when returned by the API.

Nested Model Attributes

CookieLifetime

AttributeTypeConstraintsDescription
lifetime_in_daysint1-365Cookie lifetime in days
lifetime_in_hoursint1-72Cookie lifetime in hours
lifetime_in_minutesint1-59Cookie lifetime in minutes

SplitTunneling

AttributeTypeDescription
access_routeList[str]Routes included in the tunnel
exclude_access_routeList[str]Routes excluded from the tunnel
exclude_applicationsList[str]Applications excluded from tunnel
exclude_domainsSplitTunnelingDomainsDomains excluded from the tunnel
include_applicationsList[str]Applications included in the tunnel
include_domainsSplitTunnelingDomainsDomains included in the tunnel

SplitTunnelingDomainEntry

AttributeTypeConstraintsDescription
namestrThe domain name
portsList[int]each port 1-65535Ports for the domain

Enumerations

TunnelOperatingSystem

ValueDescription
ANDROIDAndroid devices
CHROMEChrome OS devices
IOTInternet of Things devices
LINUXLinux systems
MACmacOS systems
WINDOWSWindows systems
WINDOWS_UWPWindows UWP applications
IOSiOS devices
note

Unlike the authentication settings OperatingSystem enum, tunnel profiles do not support Any, Browser, or Satellite values.

Usage Example

from scm.client import Scm
from scm.models.mobile_agent.tunnel_profiles import (
TunnelProfileCreateModel,
TunnelOperatingSystem,
)

# Initialize client
client = Scm(
client_id="your_client_id",
client_secret="your_client_secret",
tsg_id="your_tsg_id"
)

# Create a tunnel profile using a model
tunnel_profile = TunnelProfileCreateModel(
name="windows-tunnel",
os=[TunnelOperatingSystem.WINDOWS],
no_direct_access_to_local_network=True,
split_tunneling={
"access_route": ["10.0.0.0/8"],
"exclude_domains": {"list": [{"name": "example.com", "ports": [443]}]},
},
)

# Convert the model to a dictionary for the API call
profile_dict = tunnel_profile.model_dump(exclude_unset=True)
result = client.tunnel_profile.create(profile_dict)
print(f"Created tunnel profile: {result.name}")