DEV Community

Sandor Dargo
Sandor Dargo

Posted on

3 1

DevAnalytics at DOHackathon: API key masking and about page

I received a comment to my previous post about DevAnalytics mentioning that DEV API keys should be kept secrets and users might be afraid of sharing them.

That's right. And just as @raddevus mentioned it's a possibility to revoke the API key right after checking your stats.

Submitting your API key does require a certain level of trust especially because the DEV Api offers POST services such as posting an article but there is no way - as far I know - to generate a read-only API Key.

On my side, what I could do is masking the API Key as if it would be a password and putting a notice mentioning that the API key is not going to be stored by the app.

By the way, thanks, Benedict, for this nice write up.

At the same time, as I'm writing these lines I noticed that Flask logs it as part of the incoming get request on the backend side. I'll have to figure out how to remove those logs, how to prevent to log these events.

At the same time, I also added an About modal, so I also learnt a bit about how to use NG Bootstrap's Modal module.

Masked API key and modal

In the coming days, I want to sort out this problem with the backend logs and add some error handling in case there is a problem with the API key.

Feel free to try DevAnalytics and leave a comment.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay