diff --git a/public/blog/api-key-boundary/en.webp b/public/blog/api-key-boundary/en.webp new file mode 100644 index 0000000..8e94ce0 Binary files /dev/null and b/public/blog/api-key-boundary/en.webp differ diff --git a/public/blog/api-key-boundary/pl.webp b/public/blog/api-key-boundary/pl.webp new file mode 100644 index 0000000..a0cb770 Binary files /dev/null and b/public/blog/api-key-boundary/pl.webp differ diff --git a/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/en.mdx b/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/en.mdx index f526b37..82f7a2f 100644 --- a/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/en.mdx +++ b/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/en.mdx @@ -1,3 +1,5 @@ +import Image from "next/image"; + **The VIN lookup worked. That was the easy part.** In Car Brain, entering a VIN can fill in vehicle details instead of making the user type them. The first implementation called auto.dev directly from the mobile app. An agent wrote that integration; I was responsible for reviewing it. @@ -19,229 +21,21 @@ A public API base URL belongs in client configuration. A provider secret that au I moved the VIN call into an Appwrite Function the same day. The client sends the VIN; the function reads the provider key from its server-side environment and calls auto.dev.
- - {"VIN lookup: credential boundary"} - - { - "Before: mobile calls auto.dev with a provider key. After: mobile sends VIN to Appwrite; the function checks the caller and input, and calls auto.dev with its server-side key." - } - - - {"BEFORE · DIRECT CALL"} - - - - {"Mobile client"} - - - {"Provider key in client code"} - - - - {"VIN + provider credential"} - - - - {"auto.dev"} - - - - {"AFTER · FUNCTION BOUNDARY"} - - - - {"Mobile client"} - - - {"VIN + signed-in execution"} - - - - - {"Appwrite Function"} - - - {"Caller check · validation"} - - - {"Provider key stays server-side"} - - - - {"Provider call + credential"} - - - - {"auto.dev"} - - -
Conceptual request paths; not a live test.
+ +
+ {"Conceptual request flow. "} + {"Open diagram at full size"} +
The important change is the boundary around the credential. Appwrite was already part of Car Brain, so a function gave this operation a server-side home without introducing a separate API service. diff --git a/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/pl.mdx b/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/pl.mdx index 6cfbc92..990838e 100644 --- a/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/pl.mdx +++ b/src/content/blog/articles/your-api-key-is-private-until-you-ship-it/pl.mdx @@ -1,3 +1,5 @@ +import Image from "next/image"; + **Odczyt VIN działał. To była łatwiejsza część.** W Car Brain numer VIN pozwala uzupełnić dane pojazdu bez ręcznego wpisywania każdego pola. Pierwsza implementacja odpytywała auto.dev bezpośrednio z aplikacji mobilnej. Integrację napisał agent; za jej przegląd odpowiadałem ja. @@ -19,229 +21,23 @@ Publiczny adres API może być częścią konfiguracji klienta. Sekretny klucz, Tego samego dnia przeniosłem wywołanie do funkcji Appwrite. Klient wysyła VIN; funkcja pobiera klucz ze swojego środowiska po stronie serwera i odpytuje auto.dev.
- - {"VIN: granica dostępu do klucza"} - - { - "Wcześniej aplikacja wywołuje auto.dev z kluczem. Teraz wysyła VIN do Appwrite; funkcja sprawdza tożsamość i dane, a potem wywołuje auto.dev z kluczem serwera." - } - - - {"WCZEŚNIEJ · BEZPOŚREDNIO"} - - - - {"Aplikacja mobilna"} - - - {"Klucz dostawcy w kodzie klienta"} - - - - {"VIN + klucz dostawcy"} - - - - {"auto.dev"} - - - - {"TERAZ · GRANICA FUNKCJI"} - - - - {"Aplikacja mobilna"} - - - {"VIN + sesja użytkownika"} - - - - - {"Funkcja Appwrite"} - - - {"Tożsamość · walidacja"} - - - {"Klucz zostaje na serwerze"} - - - - {"Wywołanie z kluczem"} - - - - {"auto.dev"} - - -
Schemat wywołań, nie wynik testu usługi.
+ +
+ {"Schemat przepływu żądań. "} + + {"Otwórz diagram w pełnym rozmiarze"} + +
Najważniejsza zmiana dotyczy granicy dostępu do klucza. Car Brain już korzystał z Appwrite, więc funkcja pozwoliła przenieść tę operację na serwer bez dokładania osobnego serwisu API.