0

I have setup a JSON feed to allow single sign-on to another system. Currently the entry_id and email are used as part of the URL string to access the 3rd party system, but this number could be guessed. I would like to provide some security by outputting an alphanumeric string as one of the fields, and using this in the URL instead.

Is it possible to have such a string created automatically in a new field when an entry is created? Are there other options for implementing this type of security?

So currently the single sign-on URL looks something like:

http://example.com/SingleSignOn/Microsite?externalId=123_someemail@foo.com

Where externalId is a combination of the entry_id and email address of the user.

I want it to be more like:

http://example.com/SingleSignOn/Microsite?externalId=983FFC60-90DB-4527-81FD-831F4C4AD5B3

I'm not sure where to start - any advice or suggestions welcome.

1 Answer 1

3

If you are using EE4 then you could use the built-in encrypt / decrypt variable modifiers. So your template entry could end up with something like this perhaps:

{path='SingleSignon/Microsite'}?externalId={entry_id:encrypt}{email:encrypt}

HTH

2
  • So to share with others I would use {entry_id:encrypt key="somekey"}{email:encrypt key="anotherkey"}? I'm using EE3, so I guess I need to upgrade. Sep 20, 2018 at 16:04
  • 1
    I guess so - quite what you do with your encrypted items will be very much dependent upon your planned workflow. This is just one way to achieve what you describe. As for upgrading to EE4 - strongly recommend that you consider this - as it is a significantly better product (and also because publisher support for EE3 just recently ended). Sep 20, 2018 at 22:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.