Skip to content

Commit

Permalink
enhancement: added DH group 19 and sha 512 support for TFP
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwal-ibm authored and hkantare committed Mar 17, 2021
1 parent 97b6813 commit ebffedd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions ibm/resource_ibm_is_ike_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ func resourceIBMISIKEPolicy() *schema.Resource {
func resourceIBMISIKEValidator() *ResourceValidator {

validateSchema := make([]ValidateSchema, 1)
authentication_algorithm := "md5, sha1, sha256"
authentication_algorithm := "md5, sha1, sha256, sha512"
encryption_algorithm := "triple_des, aes128, aes256"
dh_group := "2, 5, 14"
dh_group := "2, 5, 14, 19"
ike_version := "1, 2"
validateSchema = append(validateSchema,
ValidateSchema{
Expand Down
2 changes: 1 addition & 1 deletion ibm/resource_ibm_is_ipsec_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func resourceIBMISIPSecPolicy() *schema.Resource {
func resourceIBMISIPSECValidator() *ResourceValidator {

validateSchema := make([]ValidateSchema, 1)
authentication_algorithm := "md5, sha1, sha256"
authentication_algorithm := "md5, sha1, sha256, sha512"
encryption_algorithm := "triple_des, aes128, aes256"
pfs := "disabled, group_2, group_5, group_14"
validateSchema = append(validateSchema,
Expand Down
4 changes: 2 additions & 2 deletions ibm/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,9 +259,9 @@ func validateMaxConn(v interface{}, k string) (ws []string, errors []error) {

func validateKeyLifeTime(v interface{}, k string) (ws []string, errors []error) {
secs := v.(int)
if secs < 300 || secs > 86400 {
if secs < 1800 || secs > 86400 {
errors = append(errors, fmt.Errorf(
"%q must be between 300 and 86400",
"%q must be between 1800 and 86400",
k))
return
}
Expand Down
6 changes: 3 additions & 3 deletions website/docs/r/is_ike_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ resource "ibm_is_ike_policy" "example" {
The following arguments are supported:

* `name` - (Required, string) Name of the IKE policy.
* `authentication_algorithm` - (Required, string) The authentication algorithm. Enumeration type: md5, sha1, sha256.
* `authentication_algorithm` - (Required, string) The authentication algorithm. Enumeration type: md5, sha1, sha256, sha512.
* `encryption_algorithm` - (Required, string) The encryption algorithm. Enumeration type: triple_des, aes128, aes256.
* `dh_group` - (Required, int) The Diffie-Hellman group. Enumeration type: 2, 5, 14.
* `dh_group` - (Required, int) The Diffie-Hellman group. Enumeration type: 2, 5, 14, 19.
* `ike_version` - (Optional,int) The IKE protocol version. Enumeration type: 1, 2.
* `key_lifetime` - (Optional, int) The key lifetime in seconds. Maximum: 86400, Minimum: 300. Default is 28800.
* `key_lifetime` - (Optional, int) The key lifetime in seconds. Maximum: 86400, Minimum: 1800. Default is 28800.
* `resource_group` - (Optional, Forces new resource, string) The resource group ID where the ike policy to be created.

## Attribute Reference
Expand Down
4 changes: 2 additions & 2 deletions website/docs/r/is_ipsec_policy.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ resource "ibm_is_ipsec_policy" "example" {
The following arguments are supported:

* `name` - (Required, string) Name of the IPsec policy.
* `authentication_algorithm` - (Required, string) The authentication algorithm. Enumeration type: md5, sha1, sha256.
* `authentication_algorithm` - (Required, string) The authentication algorithm. Enumeration type: md5, sha1, sha256, sha512.
* `encryption_algorithm` - (Required, string) The encryption algorithm. Enumeration type: triple_des, aes128, aes256.
* `pfs` - (Required, string) Perfect Forward Secrecy. Enumeration type: disabled, group_2, group_5, group_14.
* `key_lifetime` - (Optional, int) The key lifetime in seconds. Maximum: 86400, Minimum: 300. Default is 3600.
* `key_lifetime` - (Optional, int) The key lifetime in seconds. Maximum: 86400, Minimum: 1800. Default is 3600.
* `resource_group` - (Optional, Forces new resource, string) The resource group ID where the ip sec policy to be created.

## Attribute Reference
Expand Down

0 comments on commit ebffedd

Please sign in to comment.