Project

General

Profile

Bug #11449

Allow variable as directive parameters in regexp validated inputs

Added by Vincent MEMBRÉ 2 months ago. Updated about 1 month ago.

Status:
Released
Priority:
N/A
Category:
Techniques
Target version:
Target version (plugin):
Severity:
User visibility:
Effort required:
Priority:
0

Description

Host configuration technique only allow usage of values to be exact ip (regexp)

This regexp should allow variable to be used (ie sys.ipv4)

Associated revisions

Revision d26155df
Added by Vincent MEMBRÉ about 2 months ago

Fixes #11449: Allow variable as directive parameters in regexp validated inputs

History

#1 Updated by Vincent MEMBRÉ 2 months ago

File to modify is : ./techniques/systemSettings/networking/hostsConfiguration/2.0/metadata.xml

Variable is : HOSTS_IP

#2 Updated by Vincent MEMBRÉ 2 months ago

This problem should be resolved on a higher level, we don't want to fix every regexp field in every technique and maintain that.

We want to change how we check regex constraint by checking if the value contains a variable or not and accepting if this the case.

All possible case:

  • Only Value: 192.168.42.1
  • Only Variable: ${sys.ipv4}
  • Mix of Variable and Value: 192.168.${node.properties[subnet]}.1

#3 Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from New to In progress
  • Assignee set to Vincent MEMBRÉ

#4 Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/1757

#5 Updated by Nicolas CHARLES about 2 months ago

ticket name & commit name should probably be changed to "don't try to validate by regex entry that contains variables"

#6 Updated by Vincent MEMBRÉ about 2 months ago

  • Subject changed from Hosts technique does not allow to use $sys.ipv4 or any other variable to Allow variable as directive parameters in regexp validated inputs

#7 Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending technical review to Pending release

#8 Updated by Vincent MEMBRÉ about 1 month ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.8 and 4.2.1 which were released today.

Also available in: Atom PDF