[enhancement] Add support for global level crypto engine compliance shield disable Support in Terraform Provider #382
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Crypto Engine Compliance Shield Disable Support
This PR adds support for crypto engine compliance shield configuration to the terraform-provider-iosxe.
This enhancement introduces the
iosxe_crypto_engineresource and data source with the ability to disable the crypto engine compliance shield. This feature provides network operators with the flexibility to configure legacy or non-compliant cryptographic algorithms when required for interoperability with older systems or specific use cases. By default, IOS-XE enforces compliance mode which restricts the use of weak cryptographic algorithms; this resource allows administrators to disable that restriction when operationally necessary.CLI Commands Supported
Crypto Engine Configuration
This command enables the following capability:
Important Note: Disabling compliance shield mode will take effect after device reboot on some platforms.
Benefits
Platform Compatibility
These features have been validated against:
Version Requirements
IOS-XE 17.12.1 and later:
compliance_shield_disable(Boolean) - Disable crypto engine compliance shieldYANG Model Validation:
Cisco-IOS-XE-crypto:engine/compliance/shield/disablePlatform Notes:
Cisco-IOS-XE-cryptoYANG model augmented to/native/cryptoTechnical Implementation
iosxe_crypto_engineresource with the following attributes:compliance_shield_disable(Boolean, Optional) - Allow weak crypto to be configureddevice(String, Optional) - Device name from provider configurationdelete_mode(String, Optional) - Configure deletion behavior ("all" or "attributes")iosxe_crypto_enginedata source for configuration retrieval/restconf/data/Cisco-IOS-XE-native:native/crypto/Cisco-IOS-XE-crypto:engineCisco-IOS-XE-nativeandCisco-IOS-XE-cryptomodulesTesting
Go Acceptance Tests
Multi-Platform Validation
Terraform Testing
terraform plan- Correctly identifies crypto engine configuration changesterraform apply- Successfully applies crypto engine compliance shield configurationterraform destroy- Cleanly removes crypto engine configurationRESTCONF API Validation
Cisco-IOS-XE-crypto:engine)YANG Model Validation
Cisco-IOS-XE-crypto.yang, revision 2023-11-01)Cisco-IOS-XE-crypto.yang, revision 2023-07-01)enginecontainer augmented to/native/cryptocompliance/shield/disableleaf of type "empty" (boolean in Terraform)CLI Validation
show running-config | include crypto enginedisplays correct configurationExample Usage
Resulting CLI Configuration:
Documentation
docs/resources/crypto_engine.mddocs/data-sources/crypto_engine.mdexamples/resources/iosxe_crypto_engine/resource.tf