microsoft / AzUrlShortener

An simple and easy Url Shortener
MIT License
519 stars 561 forks source link

Securing the URL Endpoint #442

Closed fatpacket closed 1 year ago

fatpacket commented 1 year ago

Is there a way to secure this function with an access key and refresh key? Or some mechanism so that if this is deployed that the URL is just open to the world for anyone to shorten URLs.

┆Issue is synchronized with this Trello card by Unito

FBoucher commented 1 year ago

@fatpacket Version 3 only has the redirect method, there is no shortener or any management URL capability. We could add use the function level key but not sure if it's that critical in this case. If we do that, it will complexify the domain name configuration as the key would need to be in the Cloudflare rules.

fatpacket commented 1 year ago

I must have seen an earlier version with multiple endpoints. When I found this project, I was looking for a shortener api that I could call to create short links without a management frontend. Your FE was super nice though for displaying and checking on links. I guess in V3 its only a redirect api with the CloudFlare rules for re-writes. I still love the project and enjoyed working through all of this with your help of course. If you would like I can open an issue/feature request for a more complete API but I am not sure if that is in your roadmap.

Again thank you -Fatpacket

FBoucher commented 1 year ago

That make sense the previous version was doing that. The current is much simpler. The more complete API would be in the TinyBlazorAdmin project under the /api folder.

I would like to extract the azFunction but only if I can keep it as budget friendly and simple to deploy. Those are prime requirement for this project.

I will close this issue for now. Keep watching TinyBlazorAdmin as I might move out the API (I'm interested at making a CLI so I would need that)

Thank you for your help validating the documentation.

FBoucher commented 1 year ago

@all-contributors add @fatpacket for doc

allcontributors[bot] commented 1 year ago

@FBoucher

I've put up a pull request to add @fatpacket! :tada: