Skip to main content

Decryption Profile Configuration Object

Manages decryption profiles that control SSL/TLS inspection settings in Palo Alto Networks Strata Cloud Manager.

Class Overview​

The DecryptionProfile class inherits from BaseObject and provides CRUD operations for decryption profiles that control SSL/TLS inspection settings for both forward proxy and inbound proxy scenarios.

Methods​

MethodDescriptionParametersReturn Type
create()Creates a new profiledata: Dict[str, Any]DecryptionProfileResponseModel
get()Retrieves a profile by IDobject_id: strDecryptionProfileResponseModel
update()Updates an existing profileprofile: DecryptionProfileUpdateModelDecryptionProfileResponseModel
delete()Deletes a profileobject_id: strNone
list()Lists profiles with filteringfolder: str, **filtersList[DecryptionProfileResponseModel]
fetch()Gets profile by name and containername: str, folder: strDecryptionProfileResponseModel

Model Attributes​

Base Profile Attributes​

AttributeTypeRequiredDefaultDescription
namestrYesNoneProfile name. Pattern: ^[A-Za-z0-9][A-Za-z0-9_\-\.\s]*$
idUUIDYes*NoneUnique identifier (*response/update only)
ssl_forward_proxySSLForwardProxyNoNoneSSL Forward Proxy settings
ssl_inbound_proxySSLInboundProxyNoNoneSSL Inbound Proxy settings
ssl_no_proxySSLNoProxyNoNoneSSL No Proxy settings
ssl_protocol_settingsSSLProtocolSettingsNoNoneSSL Protocol settings
folderstrNo**NoneFolder location. Max 64 chars
snippetstrNo**NoneSnippet location. Max 64 chars
devicestrNo**NoneDevice location. Max 64 chars

* Only required for update and response models ** Exactly one container (folder, snippet, or device) must be provided for create operations

SSL Protocol Settings​

AttributeTypeRequiredDefaultDescription
min_versionSSLVersionNotls1-0Minimum SSL/TLS version
max_versionSSLVersionNotls1-2Maximum SSL/TLS version
auth_algo_md5boolNoTrueAllow MD5 authentication
auth_algo_sha1boolNoTrueAllow SHA1 authentication
auth_algo_sha256boolNoTrueAllow SHA256 authentication
auth_algo_sha384boolNoTrueAllow SHA384 authentication
enc_algo_3desboolNoTrueAllow 3DES encryption
enc_algo_aes_128_cbcboolNoTrueAllow AES-128-CBC encryption
enc_algo_aes_128_gcmboolNoTrueAllow AES-128-GCM encryption
enc_algo_aes_256_cbcboolNoTrueAllow AES-256-CBC encryption
enc_algo_aes_256_gcmboolNoTrueAllow AES-256-GCM encryption
enc_algo_chacha20_poly1305boolNoTrueAllow ChaCha20-Poly1305 encryption
enc_algo_rc4boolNoTrueAllow RC4 encryption
keyxchg_algo_dheboolNoTrueAllow DHE key exchange
keyxchg_algo_ecdheboolNoTrueAllow ECDHE key exchange
keyxchg_algo_rsaboolNoTrueAllow RSA key exchange

Forward Proxy Settings (SSLForwardProxy)​

AttributeTypeRequiredDefaultDescription
auto_include_altnameboolNoFalseInclude alternative names
block_client_certboolNoFalseBlock client certificates
block_expired_certificateboolNoFalseBlock expired certificates
block_timeout_certboolNoFalseBlock certificates that timed out
block_tls13_downgrade_no_resourceboolNoFalseBlock TLS 1.3 downgrade when no resource
block_unknown_certboolNoFalseBlock unknown certificates
block_unsupported_cipherboolNoFalseBlock unsupported ciphers
block_unsupported_versionboolNoFalseBlock unsupported versions
block_untrusted_issuerboolNoFalseBlock untrusted issuers
restrict_cert_extsboolNoFalseRestrict certificate extensions
strip_alpnboolNoFalseStrip ALPN

Inbound Proxy Settings (SSLInboundProxy)​

AttributeTypeRequiredDefaultDescription
block_if_hsm_unavailableboolNoFalseBlock if HSM is unavailable
block_if_no_resourceboolNoFalseBlock if no resources available
block_unsupported_cipherboolNoFalseBlock unsupported ciphers
block_unsupported_versionboolNoFalseBlock unsupported versions

No Proxy Settings (SSLNoProxy)​

AttributeTypeRequiredDefaultDescription
block_expired_certificateboolNoFalseBlock expired certificates
block_untrusted_issuerboolNoFalseBlock untrusted issuers

Exceptions​

ExceptionHTTP CodeDescription
InvalidObjectError400Invalid profile data or format
MissingQueryParameterError400Missing required parameters
NameNotUniqueError409Profile name already exists
ObjectNotPresentError404Profile not found
ReferenceNotZeroError409Profile still referenced
AuthenticationError401Authentication failed
ServerError500Internal server error

Basic Configuration​

from scm.client import Scm

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

profiles = client.decryption_profile

Methods​

List Decryption Profiles​

filtered_profiles = client.decryption_profile.list(
folder='Texas',
types=['forward']
)

for profile in filtered_profiles:
print(f"Name: {profile.name}")
if profile.ssl_forward_proxy:
print("Type: Forward Proxy")
elif profile.ssl_inbound_proxy:
print("Type: Inbound Proxy")

Filtering responses:

exact_profiles = client.decryption_profile.list(
folder='Texas',
exact_match=True
)

combined_filters = client.decryption_profile.list(
folder='Texas',
exact_match=True,
exclude_folders=['All'],
exclude_snippets=['default'],
exclude_devices=['DeviceA']
)

Controlling pagination with max_limit:

client.decryption_profile.max_limit = 4000

all_profiles = client.decryption_profile.list(folder='Texas')

Fetch a Decryption Profile​

profile = client.decryption_profile.fetch(name="forward-proxy-profile", folder="Texas")
print(f"Found profile: {profile.name}")

Create a Decryption Profile​

# Forward proxy configuration
forward_proxy_config = {
"name": "forward-proxy-profile",
"folder": "Texas",
"ssl_forward_proxy": {
"auto_include_altname": True,
"block_expired_certificate": True,
"block_untrusted_issuer": True
},
"ssl_protocol_settings": {
"min_version": "tls1-2",
"max_version": "tls1-3"
}
}
forward_profile = client.decryption_profile.create(forward_proxy_config)

# Inbound proxy configuration
inbound_proxy_config = {
"name": "inbound-proxy-profile",
"folder": "Texas",
"ssl_inbound_proxy": {
"block_if_no_resource": True,
"block_unsupported_cipher": True
},
"ssl_protocol_settings": {
"min_version": "tls1-2",
"max_version": "tls1-3",
"auth_algo_sha256": True,
"auth_algo_sha384": True
}
}
inbound_profile = client.decryption_profile.create(inbound_proxy_config)

Update a Decryption Profile​

existing_profile = client.decryption_profile.fetch(
name="forward-proxy-profile",
folder="Texas"
)

existing_profile.ssl_protocol_settings.min_version = "tls1-2"
existing_profile.ssl_protocol_settings.max_version = "tls1-3"
existing_profile.ssl_forward_proxy.block_expired_certificate = True
existing_profile.ssl_forward_proxy.block_untrusted_issuer = True

updated_profile = client.decryption_profile.update(existing_profile)

Delete a Decryption Profile​

client.decryption_profile.delete("123e4567-e89b-12d3-a456-426655440000")

Get a Decryption Profile by ID​

profile_by_id = client.decryption_profile.get(profile.id)
print(f"Retrieved profile: {profile_by_id.name}")

Use Cases​

Committing Changes​

result = client.commit(
folders=["Texas"],
description="Updated decryption profiles",
sync=True,
timeout=300
)
print(f"Commit job ID: {result.job_id}")

Monitoring Jobs​

job_status = client.get_job_status(result.job_id)
print(f"Job status: {job_status.data[0].status_str}")

recent_jobs = client.list_jobs(limit=10)
for job in recent_jobs.data:
print(f"Job {job.id}: {job.type_str} - {job.status_str}")

Error Handling​

from scm.exceptions import (
InvalidObjectError,
MissingQueryParameterError,
NameNotUniqueError,
ObjectNotPresentError,
ReferenceNotZeroError
)

try:
profile_config = {
"name": "test-profile",
"folder": "Texas",
"ssl_protocol_settings": {
"min_version": "tls1-2",
"max_version": "tls1-3"
},
"ssl_forward_proxy": {
"block_expired_certificate": True
}
}
new_profile = client.decryption_profile.create(profile_config)
result = client.commit(
folders=["Texas"],
description="Added test profile",
sync=True
)
status = client.get_job_status(result.job_id)

except InvalidObjectError as e:
print(f"Invalid profile data: {e.message}")
except NameNotUniqueError as e:
print(f"Profile name already exists: {e.message}")
except ObjectNotPresentError as e:
print(f"Profile not found: {e.message}")
except ReferenceNotZeroError as e:
print(f"Profile still in use: {e.message}")
except MissingQueryParameterError as e:
print(f"Missing parameter: {e.message}")