[SUPPORT] OneTimeSecret - CorneliousJD Repo


Recommended Posts

What is a One-Time Secret?

A one-time secret is a link that can be viewed only one time. A single-use URI.

Demo here: https://onetimesecret.com/

Note: This version does not feature sign ups or accounts, and can be customized with different logos/colors.

 

Why would I want to use it?

When you send people sensitive info like passwords and private links via email or chat, there are copies of that information stored in many places. If you use a one-time link instead, the information persists for a single viewing which means it can't be read by someone else later. This allows you to send sensitive information in a safe way knowing it's seen by one person only. Think of it like a self-destructing message.

 

Dependencies

Redis (with a password set). This can easily be achieved by installing the bitnami/redis (A75G's repository) container, and choose "No" for the "allow empty password" option, and setting a password. Note that I had issues connecting when my Redis passwords had special characters.

 

Considerations

You will probably want to enable persistent storage for Redis so that any pending links that haven't been viewed or expired yet are not lost when the Redis container is restarted/updated/etc. You can read more about persisting Redis here for the Bitnami container here: https://github.com/bitnami/bitnami-docker-redis#persisting-your-database

 

This is my current Redis setup, which has persistence enabled from mapping the volume.

I chose to disable AOF on my specific instance since it will not need to "play-back" from the log file, just a database snapshot for my purpsoes is enough.

image.thumb.png.b2a9ba4f7c592f106049d02bccad7445.png

Edited by CorneliousJD
Link to comment

Thanks for this, But getting a error:

 

##### Performing vars check #####
All required vars are set.
##### Building OTS configuration file from environment variables #####
##### Apply style customisations #####
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
##### Starting OTS #####
`/` is not writable.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.

 

Tried using a container path of /data but not going to use / as thats everything.

Link to comment
2 hours ago, Shad0wWulf said:

Thanks for this, But getting a error:

 

##### Performing vars check #####
All required vars are set.
##### Building OTS configuration file from environment variables #####
##### Apply style customisations #####
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
##### Starting OTS #####
`/` is not writable.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.

 

Tried using a container path of /data but not going to use / as thats everything.

 

That error shouldn't matter actually, it doesn't make a different in operation, no data is required to be stored long-term in this container. Redis persistence is the only thing you would want (and that's even a maybe, since all this data is burned so quickly anyways)

 

PS - Sorry about leaving an image URL in there, was using that for testing, editing template now to remove it whoops!

Link to comment

It doesn't work, It will appear as if its booting. chuck out all of this in the log, and then it will quit. No warnings, no errors no nothing.

 

##### Performing vars check #####
All required vars are set.
##### Building OTS configuration file from environment variables #####
##### Apply style customisations #####
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
##### Starting OTS #####
`/` is not writable.
Bundler will use `/tmp/bundler/home/unknown' as your home directory temporarily.
/usr/local/lib/ruby/2.6.0/fileutils/version.rb:4: warning: already initialized constant FileUtils::VERSION

/usr/local/bundle/gems/fileutils-1.3.0/lib/fileutils/version.rb:4: warning: previous definition of VERSION was here

/usr/local/lib/ruby/2.6.0/fileutils.rb:1267: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR

/usr/local/bundle/gems/fileutils-1.3.0/lib/fileutils.rb:1285: warning: previous definition of S_IF_DOOR was here

/usr/local/lib/ruby/2.6.0/fileutils.rb:1540: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM

/usr/local/bundle/gems/fileutils-1.3.0/lib/fileutils.rb:1568: warning: previous definition of DIRECTORY_TERM was here

/usr/local/lib/ruby/2.6.0/fileutils.rb:1595: warning: already initialized constant FileUtils::OPT_TABLE

/usr/local/bundle/gems/fileutils-1.3.0/lib/fileutils.rb:1626: warning: previous definition of OPT_TABLE was here

/usr/local/lib/ruby/2.6.0/fileutils.rb:1649: warning: already initialized constant FileUtils::LOW_METHODS

/usr/local/bundle/gems/fileutils-1.3.0/lib/fileutils.rb:1685: warning: previous definition of LOW_METHODS was here

/usr/local/lib/ruby/2.6.0/fileutils.rb:1656: warning: already initialized constant FileUtils::METHODS

/usr/local/bundle/gems/fileutils-1.3.0/lib/fileutils.rb:1692: warning: previous definition of METHODS was here

/source/onetime/vendor/bundle/ruby/2.6.0/gems/thin-1.5.0/lib/thin/server.rb:104: warning: constant ::Fixnum is deprecated

/source/onetime/lib/onetime/core_ext.rb:30: warning: constant ::Fixnum is deprecated

/source/onetime/vendor/bundle/ruby/2.6.0/gems/attic-0.5.3/lib/attic.rb:13: warning: constant ::Fixnum is deprecated

/source/onetime/vendor/bundle/ruby/2.6.0/gems/gibbler-0.8.9/lib/gibbler.rb:654: warning: constant ::Fixnum is deprecated

/source/onetime/vendor/bundle/ruby/2.6.0/gems/gibbler-0.8.9/lib/gibbler.rb:655: warning: constant ::Bignum is deprecated

 

This is the create command from Docker

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='OneTimeSecret' --net='bridge' --privileged=true -e TZ="UTC" -e HOST_OS="Unraid" -e 'OTS_DOMAIN'='onetimepw.mydomain.com' -e 'OTS_MASTER_KEY'='myrandomkey' -e 'OTS_REDIS_HOST'='192.168.1.6' -e 'OTS_REDIS_PORT'='6379' -e 'OTS_REDIS_PW'='redispw' -e 'OTS_IMAGE_FAV_ICON'='' -e 'OTS_IMAGE_LOGO'='https://www.computingtech.net/wp-content/uploads/2016/08/Full_Flat_CT_Logo.png' -e 'OTS_COLOR'='#DD4A22' -e 'OTS_SSL'='true' -p '5000:5000/tcp' 'siw36/onetimesecret'

 

Link to comment
2 hours ago, Shad0wWulf said:

It doesn't work, It will appear as if its booting. chuck out all of this in the log, and then it will quit. No warnings, no e

 

This is the create command from Docker

 


root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker create --name='OneTimeSecret' --net='bridge' --privileged=true -e TZ="UTC" -e HOST_OS="Unraid" -e 'OTS_DOMAIN'='onetimepw.mydomain.com' -e 'OTS_MASTER_KEY'='myrandomkey' -e 'OTS_REDIS_HOST'='192.168.1.6' -e 'OTS_REDIS_PORT'='6379' -e 'OTS_REDIS_PW'='redispw' -e 'OTS_IMAGE_FAV_ICON'='' -e 'OTS_IMAGE_LOGO'='https://www.computingtech.net/wp-content/uploads/2016/08/Full_Flat_CT_Logo.png' -e 'OTS_COLOR'='#DD4A22' -e 'OTS_SSL'='true' -p '5000:5000/tcp' 'siw36/onetimesecret'

 

 

So the warnings you posted are normal, that's just how this container is, but it still works (I didn't create OneTimeSecret or this container, simply bringing it to CA as a template.)

 

Try keeping it simple at first, try with the following settings instead, because I just spun up a new container on a test server and it's all still working for me there.

It looks like you're setting privelaged to true, setting a domain, setting SSL to true, and changing ports BOTH to 5000? (Don't do this, container port needs to remain 7143 or you'll never connect...)

Try not doing all that, start with a base setup with no other modifications, something like this.

 

image.thumb.png.d109eb3e71f3d8a880e2a4b8cfff565c.png

 

 

Link to comment

Right,

 

Those settings were only changed to try and fix it. 

 

I removed my very long 120 char master key and removed all symbols and made it alot shorter and that seems to have fixed it, But not on the first run after a fair few of retrys it eventually started. So i guess some odd config was saved in the .env file which now was overwritten.

 

Very odd

 

Thanks

Link to comment
3 hours ago, Shad0wWulf said:

Right,

 

Those settings were only changed to try and fix it. 

 

I removed my very long 120 char master key and removed all symbols and made it alot shorter and that seems to have fixed it, But not on the first run after a fair few of retrys it eventually started. So i guess some odd config was saved in the .env file which now was overwritten.

 

Very odd

 

Thanks

Interesting, thanks for sharing your findings.

 

I did more testing and I used a 64 character key with special characters without issue, but I did run into an issue it seems if my Redis passwords had special charcaters in it, but it straight up told me it couldn't connect to Redis at that point, so it gave the proper error on that one.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.