Can not create user with dot in userName

Hello, sorry for repeating a similar question but I can’t solve my problem using tips from those topics.
So my problem is when I tried to create a user with a userName “user.one” I get an exception

org.camunda.bpm.engine.ProcessEngineException: User has an invalid id: ‘user.one’ is not a valid resource identifier.

I read in the documentation that I need to add properties for a whiteList it seems to me that I added them but it doesn’t work. Could you tell me please what I do wrong?
My project powered by Spring I use org.camunda.bpm.springboot 7.13.0
Here is my processes.xml

<process-archive name="loan-approval">
    <process-engine>default</process-engine>
    <properties>
        <property name="isDeleteUponUndeploy">false</property>
        <property name="isScanForProcessDefinitions">true</property>
        <property name="javaSerializationFormatEnabled">true</property>


        <property name="generalResourceWhitelistPattern">[a-zA-Z0-9-@.]+</property>
        <property name="userResourceWhitelistPattern">[a-zA-Z0-9-@.]+</property>
    </properties>
</process-archive>

Thanks in advance!

A . in regex is a metacharacter, it is used to match any character. To match a literal dot, you need to escape it, so \.

Depending on the regex-parser using a . inside squared brackets [] is allowed to identify a ..
To be fully precise the last - should also be escaped. So actually the regex should look something like [a-zA-Z0-9\-@\.]+. Alternatively hit this link: https://regex101.com/r/nFE5Lk/1/ it explains the regex. You can play around with the expression by removing the escaping \ and see what the “EXPLANATION”-Tab tells you about your expression.

I think that problem with the it doesn’t work.
I changed the regex to
[a-z]+
[a-z]+
And I still can create user with login USERONE so as far as I understand these properties dont work.

Thank you for the answer, but I suppose that my problem with the property. I came to this conclusion because I tried to change my regex many times and it didn’t cause any effect.

Hi @Marat,

For a username of USERONE you would need to use a regex of [a-zA-Z]+ in order to get upper- and lower-case letters.

[a-z]+ with a username of USERONE would not match
[A-Z]+ with a username of USERONE should match.

dg

1 Like

Hi Davidgs! The problem is that the program doesn’t react on the regex changing. So I can use any regex and always get the same result. So when I use a regex [a-z]+ the name USERONE is forbidden, but I can create USERONE with the regex. Generally, my question is about how to turn on the property “generalResourceWhitelistPattern”.