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.

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

  • 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. – user2265915 Sep 20 '18 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). – jcogs.eecms Sep 20 '18 at 22:28

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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