Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Inbound Decryption for PAN-OS 10.2+ enhancement #401

Open
jamesholland-uk opened this issue Mar 2, 2023 · 2 comments
Open

Configure Inbound Decryption for PAN-OS 10.2+ enhancement #401

jamesholland-uk opened this issue Mar 2, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jamesholland-uk
Copy link
Member

Is your feature request related to a problem?

Configuring a decryption rule for inbound inspection from 10.2+ results in an error.
Task:

- name: test_panos_decryption_rule - Create inbound inspection rule
  paloaltonetworks.panos.panos_decryption_rule:
    provider: '{{ device }}'
    name: 'Test'
    source_zones: ['inside']
    source_addresses: ['any']
    destination_zones: ['outside']
    destination_addresses: ['1.1.1.1']
    services: ['service-https']
    action: 'decrypt'
    decryption_type: 'ssl-inbound-inspection'
    ssl_certificate: 'local-ca'
    decryption_profile: 'default'

Error:
fatal: [panos-10dot2]: FAILED! => {"changed": false, "msg": "Failed create: Test -> type -> ssl-inbound-inspection unexpected here\n Test -> type -> ssl-inbound-inspection is unexpected \n Test -> type is invalid"}

The XML schema changes in 10.2 to accommodate a new feature allowing multiple certificates to be used. The parameter for a certificate changed from a single string (the cert name) to a list of strings (a list of cert names).

Describe the solution you'd like

Accommodate all current supported version of PAN-OS for creating decryption rules for inbound inspection.

Describe alternatives you've considered

N/A

Additional context

N/A

@jamesholland-uk jamesholland-uk added the enhancement New feature or request label Mar 2, 2023
@shinmog
Copy link
Collaborator

shinmog commented Aug 16, 2023

This is going to require a pan-os-python change: PaloAltoNetworks/pan-os-python#521

@bgre033
Copy link

bgre033 commented Aug 21, 2023

As per SimonT's post in Live, adding lines 1241 and 1242, and commenting out 1243 resolves the issue. I only tested with a single certificate though.

.../panos/policies.py

1238         params.append(
1239             VersionedParamPath(
1240                 "ssl_certificate",
1241                 vartype="member",
1242                 path="type/{decryption_type}/certificates/",
1243                 #path="type/{decryption_type}",
1244                 condition={"decryption_type": "ssl-inbound-inspection",},
1245             )
1246         )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants