The Weird and The Wonderful
The Weird and The Wonderful forum is a place to post Coding Horrors,
Worst Practices, and the occasional flash of brilliance.
We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid
workarounds and developers just not quite getting it. And then somedays we come across - or write -
the truly sublime.
Post your Best, your worst, and your most interesting. But please - no
programming questions . This forum is purely for amusement and discussions on code snippets. All
actual programming questions will be removed.
|Which was build by a real good programmer before my time, which allows our various business groups to connect to an external 3rd party API. So far so good...
Each of the business groups has their own profile with that the external resource; they have a GUID for a license and an alias so that it is easy to see which group any GUID is associated with. Still good...
We have developed the applications that utilize this service for all but one of our business groups. The last thinks they are good enough to do their own thing. Fine. Their applications group has about 3x the staff as ours so let them do their own thing. OK....
Now they want full access to our DB or an API so that they can lookup their historical requests. Ummm... we'll do an API thank you. Blueprint it up to require the key and their CustomerID... No, authentication/authorization is not needed as this will be an internal API only. Oh we're starting to go downhill now....
From prototypes I had to do their requests manually, had this new API up in a couple of days.
Now the problems come into view.
1. On our side of the wall, what do you mean there is no auth required.
2. And from them, we don't know our key. Whomever on their side compiled an assembly so that they could just use their Alias for identification, and they don't have the source code.
So the politicians settled on this mind-number yesterday afternoon:
1. A new GUID will be created on our end for each business group.
2. A new endpoint is created where they give us their alias, and we will return this new GUID.
3. Prior endpoints will be rewritten-
3A. Instead of their license key being required, they will pass in their alias instead.
3B. The requests will require an Auth request header, containing the new GUID.
Yep... glad I have today off. Need to have it ready by Monday end-of-business.
Director of Transmogrification Services
Shinobi of Query Language
Master of Yoda Conditional
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.