this.datasources["slatwall"] = {
class: 'org.gjt.mm.mysql.Driver'
, connectionString: 'jdbc:mysql://mysql:3306/slatwall?useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true'
, username: 'root'
, password: "encrypted:1d47b6a5394fffcde0d64f1526b24a03c83a6ae87b00fade88080ee5b08bf655d425196e9695d555"
};
During instantiation with docker-compose we have a file that looks like this:
web:
build: slatwall/slatwall-lucee
ports:
- "80:8080"
links:
- db
environment:
MYSQL_ROOT_PASSWORD : ChangeThis!
db:
image: mysql
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD : ChangeThis!
MYSQL_DATABASE : slatwall
As part of our entrypoint script we want to write the environment variable of MYSQL_ROOT_PASSWORD on the slatwall/slatwall-lucee container into our application config, but I need to know how to encrypt the plain text password, into the encrypted format that Lucee can use.
Thoughts?
-Greg
date +%s | sha256sum | base64 | head -c 32 ; echo >> /tmp/MYpasswordfilewhere [option] would be the header of the config line you need to change.
Randomly generate the password, set the password then inject it into the config file.date +%s | sha256sum | base64 | head -c 32 ; echo >> /tmp/MYpasswordfile
I'm distributing an application via docker and want the end user to be able to set their password as an enviornment variable. If they choose for it to be random they can enable that during the running of the container by creating a random string to be passed to both the lucee and MySQL container. However if they want it to be something know to them so that they can connect to port 3306 and run mysql command directly... that should be fine too.
It seems as though this thread got off topic by talking about how to generate a random string. I am asking how any string, random or not, can be encrypted using whatever key lucee uses for storing datasource passwords.
Unless of course I could use a non encrypted password in my Application.cfc, but I've never seen examples of that working.
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/19513526-bf27-4289-891e-7292c456b291%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I don't know the password. The point is to allow people to define whatever password they want. Otherwise everyone running Slatwall would have the same password. It is an open source eCommerce application.
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/8ce91bcb-2ca5-48a8-b35e-4398b710325d%40googlegroups.com.
Take a look at how mysql containers are run using enviornment variables.
https://hub.docker.com/_/mysql/
For example, mysql wouldn't distribute their containers with everyone running the same MYSQL_ROOT_PASSWORD and that is why they allow you to define it when you instantiate their container.
I have a lucee container with Slatwall (http://www.slatwallcommerce.com) sitting on top of it. Both the MySQL container and the Slatwall/Lucee container get run at the same time. When that happens you want to pass as an enviornmet variable the same password into both containers. The as part of my Slatwall/Lucee container I need to encrypt that password in the way that Lucee likes so that the 2 containers can talk to eachother.
You would typically use a yaml file and docker-compose to spin up these two containers in concert. You can look to something like this magento container and how it expects a MYSQL password as an enviornment variable:
https://hub.docker.com/r/alexcheng/magento/
-Greg
--
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/46b826fb-3ba7-4777-bb0b-0371be7d77f8%40googlegroups.com.
As part of our entrypoint script we want to write the environment variable of MYSQL_ROOT_PASSWORD on the slatwall/slatwall-lucee container into our application config, but I need to know how to encrypt the plain text password, into the encrypted format that Lucee can use.
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/fbd80469-bfe6-4b19-b320-90d19022f73d%40googlegroups.com.
That is fantastic. I had assumed that it needed to be encrypted, and didn't realize that it could be in clear text.Also, thank you for pointing me towards that utility that Brad put together. I'm sure it will come in handy!-Greg
On Mon, Sep 21, 2015 at 7:13 PM, Geoff Bowers <mod...@daemon.com.au> wrote:
On Wednesday, 16 September 2015 04:07:47 UTC+10, Greg Moser wrote:As part of our entrypoint script we want to write the environment variable of MYSQL_ROOT_PASSWORD on the slatwall/slatwall-lucee container into our application config, but I need to know how to encrypt the plain text password, into the encrypted format that Lucee can use.
Don't you have to pass the mysql password as clear text from the compose file for your mysql container? If so, just pass the datasource password in clear text to lucee; it does not need to be encrypted.For future reference, one way to deal with the password encryption in Lucee/Railo is using Brad's little utility:As an aside, I find the tutum/mysql container a little bit more useful than the default as it allows you to set passwords, and create your database on container creation all via ENV variables:Hope that helps,
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
Is there anyway to pull environment variables into lucee-server.xml, I was able to successfully pull it into CFML doing the following:createObject("java", "java.lang.System").getenv().get("MYSQL_ROOT_PASSWORD")Now, I'm wondering if I could do something like:${MYSQL_ROOT_PASSWORD} in the lucee-server.xml fileDoes anyone know if this is possible?
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/5678a834-846a-4717-b78e-59897818483f%40googlegroups.com.
|
|
| CONFIDENTIAL AND PRIVILEGED - This e-mail and any attachment is intended solely for the addressee, is strictly confidential and may also be subject to legal, professional or other privilege or may be protected by work product immunity or other legal rules. If you are not the addressee please do not read, print, re-transmit, store or act in reliance on it or any attachments. Instead, please email it back to the sender and then immediately permanently delete it. Pixl8 Interactive Ltd Registered in England. Registered number: 04336501. Registered office: 8 Spur Road, Cosham, Portsmouth, Hampshire, PO6 3EB |
--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/4R_xOyfZ0fE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAEYvUxk44JzgLzPU0MYdRKPiZj6qvfuXrDV2PLyJ0Qfo9_FsfQ%40mail.gmail.com.
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMBCdPsGLn-%3DA-DUg%2BYe5KvVdDNdQdAESD4FC4krpS08AgrDjQ%40mail.gmail.com.