#gcp

2025-05-24

Google Workload Identity Federation... на ECS

Понад рік тому я писав про авторизацію з AWS до GCP. ЇЇ не так важко налаштувати та працює вона відмінно. Без жодного секрету, тільки з правильним файлом credentials.json. Але нещодавно дізнався, що є нюанс: не у всіх середовищах.

Всередині клієнту Google потрібні ключі доступу до AWS. (Щоб побудувати підпис — далі вони не йдуть.) В простому випадку код авторизації (ось на Go) шукає ключі в змінних оточення.

Якщо мовити про виконання в AWS, то ключі в оточенні знайдеш тільки в AWS Lambda. Тому що ключі ці завжди тимчасові. Та тільки Lambda теж настільки ефемерна, що її час існування не перебільшує терміну дії ключів.

А в інших місцях — на EC2 та на Fargate - є спеціальні HTTP API для отримання тимчасових ключів. Різні. Та клієнт Google вміє читати ключі тільки з EC2 Metadata API. Буквально — в їхній реалізації немає згадки про Fargate.

(До речі: намагався знайти офіційне посилання на документацію по цьому Fargate API, та знайшов тільки згадку в документації по SDK. Тобто технічно цей API... незадокументований? Таємний? Це багато пояснює.)

(Взагалі, а чому вони не використовують для цього AWS SDK, в якому вже реалізовані універсальні методи отримання ключів? Включаючи, звісно, читання з цього самого API? Політика?)

Отже, як вийти з цих обставин? Ну я знайшов дикий, але дієвий та універсальний спосіб: підробити EC2 Metadata API, а точніше, його частину, до якої звертається клієнт Google. На щастя, в credentials.json є посилання на той API, отже, його можна підмінити на наш власний. А власному залишається просто читати тимчасові ключі з Fargate API та віддавати за EC2 API - суть авторизації абсолютно не змінюється. Класичний патерн адаптера. (Але це не точно).

#AWS #GCP

Silly me: I'd assumed that just because

gcloud compute ssh \
  --project  \
  --zone  
Was forwarding my local ssh-agent's keys, that it was using those keys to login. But, I kept getting key-rejections when trying to hop to the next VM in my #GCP account. So, I checked my ~/.ssh/authorized_keys file and, instead of those keys being authorized, a third key was present. That third key was one that had been created and pushed by the gcloud utility. When I did ssh-add -L > ~/.ssh/authorized_keys, then things started working as expected.

2025-05-19

Ever had issues with #GCP #CloudRun startup probes? I have.

esg.dev/posts/cloudrun-startup

2025-05-19

"I denna lab konfigurerar du en webserver i PHP, en webutvecklingsmiljö som är bas för populära bloggmjukvaror."

Sjuk burn mot #PHP i GCPs kursmaterial? Det är inte längre ett vanligt programmeringsspråk, det är ett bloggspråk.

#GCP #GoogleCloud

2025-05-19

Jag certifierar mig för #Google Cloud genom jobbet och kursmaterialet har (fritt översatt av mig) detta citat: "Google tror att alla företag, oavsett storlek och industri, i framtiden kommer differentiera sig från sina konkurrenter genom teknologi. Och att detta mer och mer kommer ta form av mjukvara."

De säger alla, inte de flesta. Du väljer inte fik på hur goda bullarna är, du väljer på hur bra deras app är. Detta är vad Google faktiskt tror.

#GCP #GoogleCloud

2025-05-16

We've upgraded a database to see if it helps some some heavy queries.

One things for sure, we can keep it busy. 100k queries per second 👀 🤓

#django #gcp

Graph of MySQL queries executed, per second, over time. Peaking at around 100,000 per second.
Christoffer S.nopatience@swecyb.com
2025-05-15

I know there's been quite the buzz around leaving the cloud, but are we? Are companies really thinking about going back to more on-prem, or at least hybrid workloads?

I'm thinking that perhaps Container based deployments will be more common given the somewhat easier migration between different "compute" platforms, or moving it inside your own servers even.

What's your take? Are we still bound for cloud only or has recent events made that evident journey... less evident?

#Cloud #AWS #Azure #GCP #Docker #Container

2025-05-15

I have to teach some students Infrastructure as Code in a cloud. I'd love to use either AWS (for the reach), or GCP (for my famillarity). Both require a credit card for sign up (I can't reasonably ask students to do this). However, MS lets you sign up for Azure without needing a card, with access to credits and a free tier. Yet another way MS can continue their bait/switch tactics to normalise their products in education before learners get to industry, where they can be properly monetised. I hate that I have to be part of it, but I really don't have any other option beyond getting the school to take the risk of signing on for "proper" AWS or GCP accounts, and the potential bills that could come with that. I doubt either the IT department or myself will have the time or tools to limit potential financial impact if we did sign up for a "proper" account. #cloud #teaching #learning #aws #gcp #azure

Jons Mostovojsjonn@social.doma.dev
2025-05-15

How messy is #terraform with #gcp?

I'm trying to make a system where #rust worker ingests data of HTTP requests via #cloudrun, and passes them into #bigtable, which uses further ingestion recipe to export the data into #bigquery

I have tried to make a complete terraform declaration for this, but got into permission issues, then I have tried to make a system that generates all the artefacts like service accounts and docker image and then refers to those from terraform builds, but I almost don't see a value of doing it like that.

Does anyone have an example of #cloudrun #cdc? I am new to this and I feel really slow.

#lazyweb #askfedi

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst