The Simplest Way to Make Backstage and Gitea Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

You link backstage and gitea by giving your developer portal a scoped API token. This lets teams read catalog files and create new code repos from templates. Gitea hosts your Git repos on your own servers with very low resource use. Backstage reads those repos to build a central catalog of all your apps. When both tools work together, developers can launch new services in a few clicks. They do not need to set up repos by hand or ask ops for help. How data and permissions flow between backstag

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

You link backstage and gitea by giving your developer portal a scoped API token. This lets teams read catalog files and create new code repos from templates.

Gitea hosts your Git repos on your own servers with very low resource use. Backstage reads those repos to build a central catalog of all your apps. When both tools work together, developers can launch new services in a few clicks. They do not need to set up repos by hand or ask ops for help.

How data and permissions flow between backstage and gitea

The developer portal talks to your Git server over standard web APIs. You first create a dedicated bot account inside your Git server for the portal. Then you generate an API token for that bot account and store it safely.

The portal uses this token to read catalog files from your existing code repos. It checks these files on a set schedule to keep the service list fresh. When a developer adds a new file, the portal sees the change right away. It updates the team ownership data and links the repo to the service page.

Software templates need write access to your Git server to create new projects. When a developer fills out a form, the portal pulls a base template repo. It replaces the variables with the developer inputs and pushes a brand new repo. It also sets up the initial branch rules and adds the right team roles.

Common failure modes and how to scope roles

Many teams make the mistake of using a site admin token for the portal. If someone steals that broad token, they can delete every repo on your server. A shared admin account also makes your audit logs very hard to read. Every single repo change looks like the portal bot did it on its own.

You can fix this by splitting read tasks from write tasks in your setup. Give the catalog reader a role that can only read public and internal repos. Keep sensitive repos in a separate group that the portal bot cannot touch. For software templates, scope the write token to specific team groups on your server.

End-to-End Encryption + Backstage Security Plugins: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network paths between the two apps also cause problems when left wide open. Both tools often run inside the same private cluster or virtual network. You should lock down network rules so only the portal can reach the API. Set up webhook secrets so the portal only accepts valid events from your server. Always rotate your bot tokens on a set schedule to limit any leaked keys.

Keeping catalog sync and template runs fast

Polling hundreds of repos every minute can slow down a small Git server. It also wastes CPU cycles when most repos do not change very often. Instead of fast polling, use webhooks to push file changes to the portal. Your Git server sends a small payload only when someone edits a catalog file.

You should also watch your API rate limits as your engineering team grows. If fifty developers run templates at once, the portal might hit a rate limit. Raise the API limit for the portal bot IP address in your server settings. Log every failed API call so your platform team can spot broken catalog files.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Can the portal read private repos on my Git server?

Yes, the portal can read any private repo that you share with the bot. Add the bot user to the repo team with read permissions to enable sync.

Do I need a site admin account to run software templates?

No, you do not need a full site admin account for template runs. The bot only needs permission to create repos inside your target team groups.

How do I update the catalog when a repo file changes?

You can use scheduled polling or set up webhooks on your Git repos. Webhooks send updates right away and put much less load on your server.

The query runs. The emails stay hidden.