Using environment variables in properties in 4.1

Wessel, Keith kwessel at illinois.edu
Fri May 21 17:00:25 UTC 2021


That seems to have fixed it. I thought I had tried %{} in a previous iteration on 4.0, and it didn't work, but I could be wrong. The Spring docs lead me down the wrong path, too:

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.external-config.files.property-placeholders

Regardless, %{} syntax is now making the IdP happy again.

Thank you!

Keith

-----Original Message-----
From: users <users-bounces at shibboleth.net> On Behalf Of Cantor, Scott
Sent: Friday, May 21, 2021 10:54 AM
To: Shib Users <users at shibboleth.net>
Subject: Re: Using environment variables in properties in 4.1

On 5/21/21, 11:41 AM, "users on behalf of Wessel, Keith" <users-bounces at shibboleth.net on behalf of kwessel at illinois.edu> wrote:

>    idp.duo.integrationKey = ${DUO_INTEGRATION_KEY}

I think you need %{}. The dollar sign syntax is only required in a few edge cases and we had to convert to % to avoid Velocity collisions.

>    Did something change between 4.0 and 4.1 regarding the ability to reference system environment variables
> in property files? More importantly, is there a more proper (and still functioning) way to do this?

I wouldn't have expected the $ syntax to ever work, or if it did, it would have been a bit hit or miss. I know it works sometimes, but it isn't the proper way within the scope of the IdP.

Now...does the % syntax work to pull from the environment? I really don't know. I think it does but the scope of changes is massive and getting Spring to do things correctly is a very ongoing process. I know that it handles Java system properties because that's how one injects idp.home now, typically.

-- Scott



-- 
For Consortium Member technical support, see https://urldefense.com/v3/__https://wiki.shibboleth.net/confluence/x/coFAAg__;!!DZ3fjg!tTPboW3jAyPoW4bq4h4cuzXv8GTVNJQ4872BfM60cNGJiSQyvezqcgQXraZdGrDptA$ 
To unsubscribe from this list send an email to users-unsubscribe at shibboleth.net


More information about the users mailing list