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

[Feature] Client IP Address filtering model to support more than IPv4 #205

Open
0x138D5 opened this issue Feb 19, 2025 · 1 comment
Open
Labels
enhancement New feature or request 🔧

Comments

@0x138D5
Copy link

0x138D5 commented Feb 19, 2025

Describe the feature request

Summary:
Update the policy assignment, Client IP Address assignments per documentation

internal/daas/policies/policy_filter_model.go
"ip_address": schema.StringAttribute{
	Description: "IP Address of the client to be filtered.",
	Required:    true,
	Validators: []validator.String{
		stringvalidator.RegexMatches(regexp.MustCompile(util.IPv4Regex), "must be a valid IPv4 address without protocol (http:// or https://) and port number"),
	},
},

internal\util\common.go
const IPv4Regex string = `^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$`

ip_address validator should allow

  • IPv4 examples: 12.0.0.0, 12.0.0.*, 12.0.0.1-12.0.0.70, 12.0.0.1/24
  • IPv6 examples: 2001:0db8:3c4d:0015:0:0:abcd:ef12, 2001:0db8:3c4d:0015::/54

Currently using a custom build of provider to allow cidr blocks

"ip_address": schema.StringAttribute{
	Description: "IP Address of the client or subnet to be filtered.",
	Required:    true,
	Validators: []validator.String{
		stringvalidator.RegexMatches(regexp.MustCompile(util.IPv4CIDRRegex), "Invalid IP address or scope"),
	},
},
const IPv4CIDRRegex string = `^(((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4})($|/(1?[1-9]|2[0-9]|3[0-2]))$`

Is this an enhancement to an existing resource or data source, if so which one?
policy_filter_model.go

Link to any docs that cover this feature:
https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/policies/policies-create

Link to any APIs that cover this feature:
N/A

CitrixIssueId: 61041

@0x138D5 0x138D5 added the enhancement New feature or request label Feb 19, 2025
@xushengl xushengl added the 🔧 label Feb 19, 2025
@xushengl
Copy link
Contributor

Hi @0x138D5

Thanks for requesting this enhancement. We will work on it.

Best Regards,
Xusheng "Fred" Liu

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

2 participants