Last Update 6:48 AM February 17, 2025 (UTC)

Identity Blog Catcher

Brought to you by Identity Woman and Infominer.
Support this collaboration on Patreon!!!

Monday, 17. February 2025

Simon Willison

50 Years of Travel Tips

50 Years of Travel Tips These travel tips from Kevin Kelly are the best kind of advice because they're almost all both surprising but obviously good ideas. The first one instantly appeals to my love for Niche Museums, and helped me realize that traveling with someone who is passionate about something fits the same bill - the joy is in experiencing someone else's passion, no matter what the topi

50 Years of Travel Tips

These travel tips from Kevin Kelly are the best kind of advice because they're almost all both surprising but obviously good ideas.

The first one instantly appeals to my love for Niche Museums, and helped me realize that traveling with someone who is passionate about something fits the same bill - the joy is in experiencing someone else's passion, no matter what the topic:

Organize your travel around passions instead of destinations. An itinerary based on obscure cheeses, or naval history, or dinosaur digs, or jazz joints will lead to far more adventures, and memorable times than a grand tour of famous places. It doesn’t even have to be your passions; it could be a friend’s, family member’s, or even one you’ve read about. The point is to get away from the expected into the unexpected.

I love this idea:

If you hire a driver, or use a taxi, offer to pay the driver to take you to visit their mother. They will ordinarily jump at the chance. They fulfill their filial duty and you will get easy entry into a local’s home, and a very high chance to taste some home cooking. Mother, driver, and you leave happy. This trick rarely fails.

And those are just the first two!

Via Hacker News

Tags: travel, museums


Damien Bod

Customizing a single client sign-in using parameters in Duende IdentityServer

This post looks at customizing the sign-in UI and the sign-in options in an ASP.NET Core application using Duende IdentityServer and ASP.NET Core Identity. There are multiple ways of changing the look and feel of the UI for different OpenID Connect clients or different client flows. In the previous post, the UI was customized per […]

This post looks at customizing the sign-in UI and the sign-in options in an ASP.NET Core application using Duende IdentityServer and ASP.NET Core Identity. There are multiple ways of changing the look and feel of the UI for different OpenID Connect clients or different client flows. In the previous post, the UI was customized per client, this post customizes inside a single client.

Code: https://github.com/damienbod/duende-multi-tenant

Blogs in the series Multiple client sign-in customizations using Duende identity provider Customizing a single client sign-in using parameters in Duende IdentityServer Setup

The solution is setup using three different ASP.NET Core applications. In the example code, the “admin” application has different federation authentication options compared to the “shop” client authentication sign-in experience. The client ID from the authentication context is used to customize the look and feel, i.e. the styles, the layout and the options of the client are used to define which federation and authentication options are possible. The shop client can be further customized using authentication parameters sent in the OpenID Connect redirect.

OIDC client implementation

In ASP.NET Core the OpenID Connect flow implementation provides multiple events which can be changed or extended. The OnRedirectToIdentityProvider can be used to send custom parameters to the OpenID Connect server. The OAuth Pushed authorization request on top of OpenID Connect Core is used used per default in .NET 9, if the OpenID Connect server supports this.

builder.Services.AddAuthentication(options => { options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; }) .AddCookie() .AddOpenIdConnect(options => { options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; // other options ... options.Events = new OpenIdConnectEvents { OnRedirectToIdentityProvider = context => { context.ProtocolMessage.SetParameter("showadminsignin", "false"); return Task.FromResult(0); } }; });

Duende sign-in customization

In the previous post, a new sign-in UI was created for each client. The shop client has further customization. In this demo, the admin external provider can be hidden or displayed depending on what the client requests. The UI is implemented using ASP.NET Core Razor pages and a BindProperty is used for this.

[BindProperty] public bool ShowAdminSignIn { get; set; } = true;

When processes the authentication using Duende and ASP.NET Core Identity, the GetAuthorizationContextAsync method can be used to get the client requested parameters.

var context = await _interaction.GetAuthorizationContextAsync(returnUrl); ShowAdminSignIn = !(context?.Parameters["showadminsignin"] == "false");

The UI can implement any display logic using the client parameters sent in the request. In this demo, the admin UI is hidden or displayed using the client request data.

@foreach (var provider in Model.View.VisibleExternalProviders) { if (!(!Model.ShowAdminSignIn && (provider.AuthenticationScheme == "AdminEntraID"))) { <li class="list-inline-item"> <a class="btn btn-secondary" asp-page="/ExternalLogin/Challenge" asp-route-scheme="@provider.AuthenticationScheme" asp-route-returnUrl="@Model.Input.ReturnUrl"> @provider.DisplayName </a> </li> } }

Notes

This is an easy approach to implement UI customization on a per client basis. The is UI logic and not authorization. The different options are just hidden or removed from the UI using the client parameters, the logic MUST not work if this is a security requirement. This is not authorization.

Links

https://docs.duendesoftware.com/identityserver/v7

https://docs.duendesoftware.com/identityserver/v7/ui/federation/

https://learn.microsoft.com/en-us/aspnet/core/razor-pages


Simon Willison

LLM 0.22, the annotated release notes

I released LLM 0.22 this evening. Here are the annotated release notes: model.prompt(..., key=) for API keys chatgpt-4o-latest llm logs -s/--short llm models -q gemini -q exp llm embed-multi --prepend X Everything else model.prompt(..., key=) for API keys Plugins that provide models that use API keys can now subclass the new llm.KeyModel and llm.AsyncKeyModel

I released LLM 0.22 this evening. Here are the annotated release notes:

model.prompt(..., key=) for API keys chatgpt-4o-latest llm logs -s/--short llm models -q gemini -q exp llm embed-multi --prepend X Everything else model.prompt(..., key=) for API keys
Plugins that provide models that use API keys can now subclass the new llm.KeyModel and llm.AsyncKeyModel classes. This results in the API key being passed as a new key parameter to their .execute() methods, and means that Python users can pass a key as the model.prompt(..., key=) - see Passing an API key. Plugin developers should consult the new documentation on writing Models that accept API keys. #744

This is the big change. It's only relevant to you if you use LLM as a Python library and you need the ability to pass API keys for OpenAI, Anthropic, Gemini etc in yourself in Python code rather than setting them as an environment variable.

It turns out I need to do that for Datasette Cloud, where API keys are retrieved from individual customer's secret stores!

Thanks to this change, it's now possible to do things like this - the key= parameter to model.prompt() is new:

import llm model = llm.get_model("gpt-4o-turbo") response = model.prompt("Surprise me!", key="my-api-key") print(response.text())

Other plugins need to be updated to take advantage of this new feature. Here's the documentation for plugin developers - I've released llm-anthropic 0.13 and llm-gemini 0.11 implementing the new pattern.

chatgpt-4o-latest
New OpenAI model: chatgpt-4o-latest. This model ID accesses the current model being used to power ChatGPT, which can change without warning. #752

This model has actually been around since August 2024 but I had somehow missed it. chatgpt-4o-latest is a model alias that provides access to the current model that is being used for GPT-4o running on ChatGPT, which is not the same as the GPT-4o models usually available via the API. It got an upgrade last week so it's currently the alias that provides access to the most recently released OpenAI model.

Most OpenAI models such as gpt-4o provide stable date-based aliases like gpt-4o-2024-08-06 which effectively let you "pin" to that exact model version. OpenAI technical staff have confirmed that they don't change the model without updating that name.

The one exception is chatgpt-4o-latest - that one can change without warning and doesn't appear to have release notes at all.

It's also a little more expensive that gpt-4o - currently priced at $5/million tokens for input and $15/million for output, compared to GPT 4o's $2.50/$10.

It's a fun model to play with though! As of last week it appears to be very chatty and keen on using emoji. It also claims that it has a July 2024 training cut-off.

llm logs -s/--short
New llm logs -s/--short flag, which returns a greatly shortened version of the matching log entries in YAML format with a truncated prompt and without including the response. #737

The llm logs command lets you search through logged prompt-response pairs - I have 4,419 of them in my database, according to this command:

sqlite-utils tables "$(llm logs path)" --counts | grep responses

By default it outputs the full prompts and responses as Markdown - and since I've started leaning more into long context models (some recent examples) my logs have been getting pretty hard to navigate.

The new -s/--short flag provides a much more concise YAML format. Here are some of my recent prompts that I've run using Google's Gemini 2.0 Pro experimental model - the -u flag includes usage statistics, and -n 4 limits the output to the most recent 4 entries:

llm logs --short -m gemini-2.0-pro-exp-02-05 -u -n 4 - model: gemini-2.0-pro-exp-02-05 datetime: '2025-02-13T22:30:48' conversation: 01jm0q045fqp5xy5pn4j1bfbxs prompt: '<documents> <document index="1"> <source>./index.md</source> <document_content> # uv An extremely fast Python package...' usage: input: 281812 output: 1521 - model: gemini-2.0-pro-exp-02-05 datetime: '2025-02-13T22:32:29' conversation: 01jm0q045fqp5xy5pn4j1bfbxs prompt: I want to set it globally so if I run uv run python anywhere on my computer I always get 3.13 usage: input: 283369 output: 1540 - model: gemini-2.0-pro-exp-02-05 datetime: '2025-02-14T23:23:57' conversation: 01jm3cek8eb4z8tkqhf4trk98b prompt: '<documents> <document index="1"> <source>./LORA.md</source> <document_content> # Fine-Tuning with LoRA or QLoRA You c...' usage: input: 162885 output: 2558 - model: gemini-2.0-pro-exp-02-05 datetime: '2025-02-14T23:30:13' conversation: 01jm3csstrfygp35rk0y1w3rfc prompt: '<documents> <document index="1"> <source>huggingface_hub/__init__.py</source> <document_content> # Copyright 2020 The...' usage: input: 480216 output: 1791 llm models -q gemini -q exp
Both llm models and llm embed-models now take multiple -q search fragments. You can now search for all models matching "gemini" and "exp" using llm models -q gemini -q exp. #748

I have over 100 models installed in LLM now across a bunch of different plugins. I added the -q option to help search through them a few months ago, and now I've upgraded it so you can pass it multiple times.

Want to see all the Gemini experimental models?

llm models -q gemini -q exp

Outputs:

GeminiPro: gemini-exp-1114 GeminiPro: gemini-exp-1121 GeminiPro: gemini-exp-1206 GeminiPro: gemini-2.0-flash-exp GeminiPro: learnlm-1.5-pro-experimental GeminiPro: gemini-2.0-flash-thinking-exp-1219 GeminiPro: gemini-2.0-flash-thinking-exp-01-21 GeminiPro: gemini-2.0-pro-exp-02-05 (aliases: g2)

For consistency I added the same options to the llm embed-models command, which lists available embedding models.

llm embed-multi --prepend X
New llm embed-multi --prepend X option for prepending a string to each value before it is embedded - useful for models such as nomic-embed-text-v2-moe that require passages to start with a string like "search_document: ". #745

This was inspired by my initial experiments with Nomic Embed Text V2 last week.

Everything else
The response.json() and response.usage() methods are now documented.

Someone asked a question about these methods online, which made me realize they weren't documented. I enjoy promptly turning questions like this into documentation!

Fixed a bug where conversations that were loaded from the database could not be continued using asyncio prompts. #742

This bug was reported by Romain Gehrig. It turned out not to be possible to execute a follow-up prompt in async mode if the previous conversation had been loaded from the database.

% llm 'hi' --async Hello! How can I assist you today? % llm 'now in french' --async -c Error: 'async for' requires an object with __aiter__ method, got Response

I fixed the bug for the moment, but I'd like to make the whole mechanism of persisting and loading conversations from SQLite part of the documented and supported Python API - it's currently tucked away in CLI-specific internals which aren't safe for people to use in their own code.

New plugin for macOS users: llm-mlx, which provides extremely high performance access to a wide range of local models using Apple's MLX framework.

Technically not a part of the LLM 0.22 release, but I like using the release notes to help highlight significant new plugins and llm-mlx is fast coming my new favorite way to run models on my own machine.

The llm-claude-3 plugin has been renamed to llm-anthropic.

I wrote about this previously when I announced llm-anthropic. The new name prepares me for a world in which Anthropic release models that aren't called Claude 3 or Claude 3.5!

Tags: projects, ai, annotated-release-notes, openai, generative-ai, chatgpt, llms, llm, anthropic, gemini


John Philpin : Lifestream

🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀


🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀


🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀


🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀

🗺️ 🚘 📸 👀


A couple o’ quotes via John Naughton … If it’s sent by s

A couple o’ quotes via John Naughton … If it’s sent by ship, it’s cargo. If sent by road, it’s shipment. 💬 Dave Allen We stand at a crossroads. One path leads to despair, the other to destruction. Let’s hope we make the right choice. 💬 Woody Allen

A couple o’ quotes via John Naughton …

If it’s sent by ship, it’s cargo. If sent by road, it’s shipment.

💬 Dave Allen

We stand at a crossroads. One path leads to despair, the other to destruction. Let’s hope we make the right choice.

💬 Woody Allen


Can We Please Stop Calling These People Populists? – Trump

Can We Please Stop Calling These People Populists? – Trumpism is not a working-class revolt against the elites. All I see is one section of the educated elite going after another section of the educated elite. 💬 David Brooks Dear David - of course we can - just as soon as you stop calling those other people ‘Elites’.. they are not. They just happen to have a lot of money and so feel enti

Can We Please Stop Calling These People Populists? – Trumpism is not a working-class revolt against the elites. All I see is one section of the educated elite going after another section of the educated elite.

💬 David Brooks

Dear David - of course we can - just as soon as you stop calling those other people ‘Elites’.. they are not.

They just happen to have a lot of money and so feel entitled to be treated differently to the rest of us.


Talent hits a target no one else can hit; genius hits a ta

Talent hits a target no one else can hit; genius hits a target no one else can see. 💬 Schopenhauer (via John. Naughton) I kinda get it. BUT. If we can’t see it .. how do we know?

Talent hits a target no one else can hit; genius hits a target no one else can see.

💬 Schopenhauer

(via John. Naughton)

I kinda get it. BUT. If we can’t see it .. how do we know?


@_Nat Zone

3月6日 FIN/SUMシンポジウムパネル「デジタル認証、デジタルIDが目指す未来の暮らし、仕事、社会」に出演します

毎年のことですが、今年もFIN/SUMに出ます。錚々たるパネリストの方々をモデレートさせていただきます。日経主催のFIN/SUMシンポジウムパネルです。 17:40-18:30 パネル デジタル認証、デジタル ID が目指す未来の暮らし、仕事、社会 セッション概要 日時 3月6日…

毎年のことですが、今年もFIN/SUMに出ます。錚々たるパネリストの方々をモデレートさせていただきます。日経主催のFIN/SUMシンポジウムパネルです。

17:40-18:30 パネル デジタル認証、デジタル ID が目指す未来の暮らし、仕事、社会 セッション概要 日時3月6日(木)17:40-18:30会場丸ビルカンファレンスホール
(HALL A : 丸ビルホール 7F)タイトルデジタル認証、デジタルIDが目指す未来の暮らし、仕事、社会

生成AIの登場で不正アクセスやなりすまし詐欺などの犯罪が急増するデジタル社会。デジタル認証やデジタルIDは、こうしたリスクを防ぎながら、さまざまな工夫を凝らしてよりよいデジタル社会の実現を目指します。金融サービスから行政のあり方、働き方、暮らしまで、最適化された未来のデジタル社会の姿を探ります。

登壇者(敬称略)

山廣弘佳 大日本印刷情報イノベーション事業部チームリーダー
日下光 xID代表取締役
林達也 デジタル庁アイデンティティアーキテクト
間下公照 ジェーシービー イノベーション統括部市場調査室長
崎村夏彦 OpenID Foundation理事長 (モデレーター)

なお、この直後のセッションも面白いですので合わせてお願いします。

18:40-19:30 政府・日銀本音トーク 〜新時代のマネーとフィンテック セッション概要 日時3月6日(木)18:40-19:30会場丸ビルカンファレンスホール
(HALL A : 丸ビルホール 7F)タイトル政府・日銀本音トーク 〜新時代のマネーとフィンテック

財務省・日銀・金融庁の現場責任者が、テクノロジー x マネーを中心にデジタル金融の未来を語る

登壇者(敬称略)

鳩貝淳一郎 日本銀行 決済機構局 FinTech 副センター長 デジタル通貨検証グループ長
津田夏樹 財務省 理財局国庫課 課長兼デジタル通貨企画官
牛田遼介 金融庁 チーフ・フィンテック・オフィサー
楠正憲 デジタル庁統括官

お申し込みは

お申し込みは公式サイトよりお願いいたします。

その他のプログラム

そのたのプログラムは以下のとおりです。

jp_session_2025

Sunday, 16. February 2025

Ben Werdmüller

Bringing Quote Posts to Mastodon

[Mastodon] Mastodon doesn't have quote posts, but is finally adding them after years of pressure. It's a harder decision than you might think - which is made clear by this excellent post by the team. In order to help mitigate potential abuse, the team has imposed three main requirements: You will be able to choose whether your posts can be quoted at all. You will be notif

[Mastodon]

Mastodon doesn't have quote posts, but is finally adding them after years of pressure. It's a harder decision than you might think - which is made clear by this excellent post by the team.

In order to help mitigate potential abuse, the team has imposed three main requirements:

You will be able to choose whether your posts can be quoted at all. You will be notified when someone quotes you. You will be able to withdraw your post from the quoted context at any time.

Some Mastodon clients fake support now by showing a post in a quoted context whenever it's linked to from another post, but this doesn't have any of the aforementioned properties, and therefore is more susceptible to abuse. And ActivityPub, as yet, doesn't have a great way to represent this either.

So it makes sense that it's taken a while: Mastodon wants to do it correctly to preserve community health, and do it in a standard way that other Fediverse participants can use, too.

I appreciate the transparency and approach. I'd love to see many more updates in this vein.

#Fediverse

[Link]


Silicon Valley Software Engineers Horrified as They Can't Easily Find Jobs Anymore

[Joe Wilkins in Futurism] The job market in the tech industry has been brutal for a little while now, and doesn't show signs of getting easier. "Of all the workers devastated by the carnage, former tech workers in Silicon Valley are having a particularly rough go of it. The region's former software engineers and developers — whose jobs were previously thought to be ironclad

[Joe Wilkins in Futurism]

The job market in the tech industry has been brutal for a little while now, and doesn't show signs of getting easier.

"Of all the workers devastated by the carnage, former tech workers in Silicon Valley are having a particularly rough go of it.

The region's former software engineers and developers — whose jobs were previously thought to be ironclad — are now having to contend with a fiercely competitive job market in one of the most expensive housing markets in the world."

Silicon Valley - which, here as in a lot of places, is incorrectly used to mean the San Francisco Bay Area - is in a bit of a pickle. Mass layoffs have driven down salaries, so many tech companies are quietly firing swathes of workers and re-hiring those seats in order to lower their costs. That's before you get to the actual downsizing, which has sometimes been significant.

And at the same time, living costs are sky-high, and house prices are all but unobtainable. When so many peoples' wealth is tied to the equity in their home, there are two possible outcomes: a significant drop in wealth as prices decline (particularly as fired employees flee for more affordable climes), or a significant increase in inequality as prices continue to climb. Either way, that doesn't look good.

That's a societal problem, but it's also a problem for the tech industry. Who can afford to found a startup when base prices are so high? The demographics of founders are narrowing to the already well off, forcing other founders to look elsewhere.

The solution will have to involve more help (potentially including more startup funding for a wider set of founders) or better jobs in the area. Otherwise Silicon Valley will continue to lose talent to other parts of the country and the world. Tech companies are trying to get their employees to return to the office to counteract this effect, but it simply won't be enough; no RTO policy is compelling enough when you can't afford to buy a house and bring up a family.

That's an opportunity for other ecosystems, but it's one that they will need to intentionally pick up. To date, smart tech ecosystem strategies in other parts of the world have been few and far between - not least because they aim for a similar level of talent density as Silicon Valley rather than embracing a remote, distributed culture.

I openly miss living in the Bay Area and may return in the future, so I have skin in the game. I'm curious to see what happens here.

#Technology

[Link]


John Philpin : Lifestream

🕵💬 Inspired By People | 🌐 Hubert H. Humphrey The Full C

🕵💬 Inspired By People | 🌐 Hubert H. Humphrey The Full Collection : Visual Scroll | 🔍 List Of Posts

🕵💬 Inspired By People | 🌐 Hubert H. Humphrey

The Full Collection : Visual Scroll | 🔍 List Of Posts


Ben Werdmüller

Life in Weeks

Inspired by Gina Trapani, Buster Benson, and others, I started to build my own Life in Weeks page from scratch. It looks pretty cool, and it’s interesting to see my life milestones presented on this scale. But I’m not going to share it with you. As I was building it, it became clear how much personal information I was sharing — and not just my own, but that of my parents, my sister, my partner

Inspired by Gina Trapani, Buster Benson, and others, I started to build my own Life in Weeks page from scratch. It looks pretty cool, and it’s interesting to see my life milestones presented on this scale.

But I’m not going to share it with you.

As I was building it, it became clear how much personal information I was sharing — and not just my own, but that of my parents, my sister, my partner, my child, other members of my extended family. It’s a privacy violation at best and an identity theft goldmine at worst. My life is mine, their lives are theirs, and these things don’t need to be published in public on the web.

This is, perhaps, an area of growth for me: Ben in his twenties would absolutely have published it. But our lives are like a fingerprint; unique to us. Not everything needs to be made available for free to everyone.

The code is pretty simple and the payload is lightweight (unlike Gina and Buster, I haven’t relied on Bootstrap, for example), so I’m going to find another use for it. Maybe a Life in Weeks for characters from my novel? For the web itself? I’ll think about it.


An update on searching for trans-friendly employers who sponsor visas

Last month I asked to hear from trans-friendly employers who sponsor visas, and provided a simple form for interested employers to reach out. In the process, I heard from many individuals: people who were hoping to find new employment in another country, and people who worked for companies that were aligned, who were encouraging their bosses to fill in the form. A quick reminder before we div

Last month I asked to hear from trans-friendly employers who sponsor visas, and provided a simple form for interested employers to reach out. In the process, I heard from many individuals: people who were hoping to find new employment in another country, and people who worked for companies that were aligned, who were encouraging their bosses to fill in the form.

A quick reminder before we dive in: I’m not providing formal legal or financial advice. I’m just trying to point people in the right direction and provide some ideas for relocation for people who want it.

The bad news

Here’s the bad news: today, that form sits empty. While the post was shared far and wide, not a single person has filled it in.

I think there are a few reasons for this. First and foremost, in the current environment, being listed in such a database presents a significant risk, particularly if you’re doing business with US entities. In an environment where the administration is firing employees and cutting contracts for even the barest mention of support for trans people, there’s every reason to believe that the current administration will penalize people and organizations who work with trans people.

So, that’s not great. I’m very sorry to everyone who got their hopes up that I would be able to make direct connections.

The good news

The good news: some countries actively sponsor visas, welcome trans people, and are hiring.

In my personal conversations with people, what jumped out again and again was that emigrating to the Netherlands was a viable route for many people — and particularly those with tech skills (engineering, IT, product management, design, research, and so on).

Reasons include:

Dutch tech companies tend to sponsor visas. (Look for job vacancies written in English and/or on boards like Tech Me Abroad and Relocate.me.) You can relocate with a self-employment visa if you have a skilled background, can demonstrate at least one Dutch-based contract or that you’ll start a tech-based business, and can show that you’ll independently make €1,613 (~$1,700) per month. The DAFT visa lowers the barrier to entry for US entrepreneurs who can commit to invest €4,500 (~$4,700). The Netherlands is a progressive country, even given its current right-wing government. 90-93% of Dutch people speak English fluently.

The Netherlands is also kind of just a neat country: excellent social safety net, great support for culture and the arts, good connectivity to other European countries, and a strong grant support network for mission-driven tech. Amsterdam is a first-class cosmopolitan city, but other centers in the Netherlands are not to be sniffed at, and the country is so small that you can easily take public transit from one to another in less time than it might take you to commute to work by car in the US.

It is not, however, perfect. Much like the US, the Netherlands has had its own racial reckoning; unlike the US, the discourse has often centered on the idea that racism doesn’t happen there. That’s a rich claim from a society where racist tropes like Zwarte Piet are still commonplace, and where women of color are often marginalized. There’s work to be done — although it’s worth asking if this is truly any worse than the US.

Not everybody can relocate, and not everybody has these skills. I’m aware that this is a privileged route that not everybody can take advantage of. It would be better if there was a defined route for everybody who needed to find a safer place to live; it would be better still if a safe place to live was the place they already call home. This situation is sick and sad, and I truly wish that everything was different.

It also comes with an attendant cost. It’s estimated that moving to the Netherlands will set you back between $6-10K. That’s a lot less than one might expect, but it’s obviously a significant barrier for many people. Unfortunately, very little financial support exists for these moves. If you know of grants, mutual aid funds, or community resources that help trans people relocate, please share them. Funding and guidance from those who’ve navigated the process could make all the difference.

Please reach out

In the meantime, I’ll keep looking. If you are a company in a country that is safe for trans people, and you’re looking to hire people from the US who need visa sponsorship, please fill out this form or reach out to me via email. I’m not giving up.


Organizing on decentralized social networks

[Jon Pincus at The Nexus of Privacy] There's an argument that one reason Elon Musk bought Twitter was to reduce its effectiveness as a platform for progressive organizing. Whether you buy that or not, it's clear that the new set of social networks are fertile ground for new and existing movements to make progress. The question is: how? Jon is an experienced organizer and is h

[Jon Pincus at The Nexus of Privacy]

There's an argument that one reason Elon Musk bought Twitter was to reduce its effectiveness as a platform for progressive organizing. Whether you buy that or not, it's clear that the new set of social networks are fertile ground for new and existing movements to make progress.

The question is: how? Jon is an experienced organizer and is here to help out:

"The Nexus of Privacy is planning a series of online discussions and video/phone calls focusing on organizing on decentralized social networks. There's a range of topics to cover, including looking at the tradeoffs between the different platforms for different use cases, brainstorming how organizers can leverage these platforms, easy ways to start exploring, and ways for groups to move as a whole."

There's a form to express interest (which uses CryptPad to support anonymity, which is both new to me and seems like a great platform in itself). If you're interested in organizing using decentralized social networks as a tool, these sessions look like they'll be a good resource.

#Fediverse

[Link]


Tech continues to be political

[Miriam Eric Suzanne] Every single word of this piece resonated for me, from the underlying discomfort to the realization that AI as it currently manifests reflects a kind of fascist mindset in itself: an enclosure movement of culture and diversity that concentrates power into a handful of vendors. This is true of me too: "Based on every conference I’ve attended over the la

[Miriam Eric Suzanne]

Every single word of this piece resonated for me, from the underlying discomfort to the realization that AI as it currently manifests reflects a kind of fascist mindset in itself: an enclosure movement of culture and diversity that concentrates power into a handful of vendors.

This is true of me too:

"Based on every conference I’ve attended over the last year, I can absolutely say we’re a fringe minority. And it’s wearing me out. I don’t know how to participate in a community that so eagerly brushes aside the active and intentional/foundational harms of a technology. In return for what? Faster copypasta? Automation tools being rebranded as an “agentic” web? Assurance that we won’t be left behind?"

I think drawing the line between "tech" and "the web" is important, and this piece captures exactly how I've been feeling about it:

"“Tech” was always a vague and hand-waving field – a way to side-step regulations while starting an unlicensed taxi company or hotel chain. That was never my interest.

But I got curious about the web, a weird little project built for sharing research between scientists. And I still think this web could be pretty cool, actually, if it wasn’t trapped in the clutches of big tech. If we can focus on the bits that make it special – the bits that make it unwieldy for capitalism."

So this post made me (1) feel less alone (2) like I want to be friends with its author. This is a fringe feeling, unfortunately, but if enough of us stick together, maybe we can manifest an alternative.

#Technology

[Link]


Simon Willison

Introducing Perplexity Deep Research

Introducing Perplexity Deep Research Perplexity become the third company to release a product with "Deep Research" in the name. Google's Gemini Deep Research: Try Deep Research and our new experimental model in Gemini, your AI assistant on December 11th 2024 OpenAI's ChatGPT Deep Research: Introducing deep research - February 2nd 2025 And now Perplexity Deep Research, announced on Febr

Introducing Perplexity Deep Research

Perplexity become the third company to release a product with "Deep Research" in the name.

Google's Gemini Deep Research: Try Deep Research and our new experimental model in Gemini, your AI assistant on December 11th 2024 OpenAI's ChatGPT Deep Research: Introducing deep research - February 2nd 2025

And now Perplexity Deep Research, announced on February 14th.

The three products all do effectively the same thing: you give them a task, they go out and accumulate information from a large number of different websites and then use long context models and prompting to turn the result into a report. All three of them take several minutes to return a result.

In my AI/LLM predictions post on January 10th I expressed skepticism at the idea of "agents", with the exception of coding and research specialists. I said:

It makes intuitive sense to me that this kind of research assistant can be built on our current generation of LLMs. They’re competent at driving tools, they’re capable of coming up with a relatively obvious research plan (look for newspaper articles and research papers) and they can synthesize sensible answers given the right collection of context gathered through search.

Google are particularly well suited to solving this problem: they have the world’s largest search index and their Gemini model has a 2 million token context. I expect Deep Research to get a whole lot better, and I expect it to attract plenty of competition.

Just over a month later I'm feeling pretty good about that prediction!

Tags: gemini, ai-agents, ai, llms, google, generative-ai, perplexity, chatgpt

Saturday, 15. February 2025

Simon Willison

Quoting Kevin Samuel

[...] if your situation allows it, always try uv first. Then fall back on something else if that doesn’t work out. It is the Pareto solution because it's easier than trying to figure out what you should do and you will rarely regret it. Indeed, the cost of moving to and from it is low, but the value it delivers is quite high. — Kevin Samuel, Bite code! Tags: uv, astral, python

[...] if your situation allows it, always try uv first. Then fall back on something else if that doesn’t work out.

It is the Pareto solution because it's easier than trying to figure out what you should do and you will rarely regret it. Indeed, the cost of moving to and from it is low, but the value it delivers is quite high.

Kevin Samuel, Bite code!

Tags: uv, astral, python


Run LLMs on macOS using llm-mlx and Apple's MLX framework

llm-mlx is a brand new plugin for my LLM Python Library and CLI utility which builds on top of Apple's excellent MLX array framework library and mlx-lm package. If you're a terminal user or Python developer with a Mac this may be the new easiest way to start exploring local Large Language Models. Running Llama 3.2 3B using llm-mlx If you haven't already got LLM installed you'll need to install

llm-mlx is a brand new plugin for my LLM Python Library and CLI utility which builds on top of Apple's excellent MLX array framework library and mlx-lm package. If you're a terminal user or Python developer with a Mac this may be the new easiest way to start exploring local Large Language Models.

Running Llama 3.2 3B using llm-mlx

If you haven't already got LLM installed you'll need to install it - you can do that in a bunch of different ways - in order of preference I like uv tool install llm or pipx install llm or brew install llm or pip install llm.

Next, install the new plugin (macOS only):

llm install llm-mlx

Now download and register a model. Llama 3.2 3B is an excellent first choice - it's pretty small (a 1.8GB download) but is a surprisingly capable starter model.

llm mlx download-model mlx-community/Llama-3.2-3B-Instruct-4bit

This will download 1.8GB of model weights from mlx-community/Llama-3.2-3B-Instruct-4bit on Hugging Face and store them here:

~/.cache/huggingface/hub/models--mlx-community--Llama-3.2-3B-Instruct-4bit

Now you can start running prompts:

llm -m mlx-community/Llama-3.2-3B-Instruct-4bit 'Python code to traverse a tree, briefly'

Which output this for me:

Here's a brief example of how to traverse a tree in Python:

class Node: def __init__(self, value): self.value = value self.children = [] def traverse_tree(node): if node is None: return print(node.value) for child in node.children: traverse_tree(child) # Example usage: root = Node("A") root.children = [Node("B"), Node("C")] root.children[0].children = [Node("D"), Node("E")] root.children[1].children = [Node("F")] traverse_tree(root) # Output: A, B, D, E, C, F

In this example, we define a Node class to represent each node in the tree, with a value attribute and a list of children. The traverse_tree function recursively visits each node in the tree, printing its value.

This is a basic example of a tree traversal, and there are many variations and optimizations depending on the specific use case.

That generation ran at an impressive 152 tokens per second!

That command was a bit of a mouthful, so let's assign an alias to the model:

llm aliases set l32 mlx-community/Llama-3.2-3B-Instruct-4bit

Now we can use that shorter alias instead:

llm -m l32 'a joke about a haggis buying a car'

(The joke isn't very good.)

As with other models supported by LLM, you can also pipe things to it. Here's how to get it to explain a piece of Python code (in this case itself):

cat llm_mlx.py | llm -m l32 'explain this code'

The response started like this:

This code is a part of a larger project that uses the Hugging Face Transformers library to create a text-to-text conversational AI model. The code defines a custom model class MlxModel and a set of command-line interface (CLI) commands for working with MLX models. [...]

Here's the rest of the response. I'm pretty amazed at how well it did for a tiny 1.8GB model!

This plugin can only run models that have been converted to work with Apple's MLX framework. Thankfully the mlx-community organization on Hugging Face has published over 1,000 of these. A few I've tried successfully:

mlx-community/Qwen2.5-0.5B-Instruct-4bit - 278 MB mlx-community/Mistral-7B-Instruct-v0.3-4bit - 4.08 GB mlx-community/Mistral-Small-24B-Instruct-2501-4bit - 13.26 GB mlx-community/DeepSeek-R1-Distill-Qwen-32B-4bit - 18.5 GB mlx-community/Llama-3.3-70B-Instruct-4bit - 40 GB

Mistral-Small-24B really does feel GPT-4 quality despite only needing around 12GB of RAM to run - so it's a good default model if you want to leave space to run other apps.

DeepSeek-R1-Distill-Qwen-32B-4bit is a great model if you want to try out R1 style "reasoning" which outputs a <think>...</think>... block at the start of each response.

That last Llama 70B one needs a machine with 64GB of RAM to run but is very capable - I wrote about trying out the Ollama version of Llama 3.3 70B in I can now run a GPT-4 class model on my laptop back in December.

llm mlx download-model mlx-community/Llama-3.3-70B-Instruct-4bit

For larger models like that I recommend using the llm chat command as that ensures they stay in memory for multiple rounds of the conversation:

llm chat -m mlx-community/Llama-3.3-70B-Instruct-4bit

Activity Monitor shows the process using 37.5GB of RAM while the model is running.

Some of these jokes are actually pretty good!

Chatting with mlx-community/Llama-3.3-70B-Instruct-4bit Type 'exit' or 'quit' to exit Type '!multi' to enter multiple lines, then '!end' to finish > hi How's your day going so far? Is there something I can help you with or would you like to chat? > jokes about weird animals please Here are a few: 1. Why did the axolotl go to therapy? Because it was struggling to come to terms with its identity crisis... and also because it had a lot of "regrowing" to do! 2. What did the aye-aye say to the other aye-aye when they were out on a date? "You've got a finger on the pulse of my heart!" 3. Why did the naked mole rat go to the party? Because it was a "hair-raising" experience and it wanted to get to the "root" of the fun! 4. What do you call a group of flamingos playing instruments? The Pink Floyd... of the avian world, of course! 5. Why did the blobfish go to the doctor? It had a "gut" feeling something was wrong... and also because it was feeling a little "deflated"! Want more? I've got a whole zoo of 'em!

That ran at 8.8 tokens per second.

As with every LLM plugin, all prompts and responses are logged to a SQLite database that can be accessed using the llm logs command.

You can use LLM models from your Python code as well. The README includes notes on how to do this, as does the LLM Python API documentation. TLDR:

import llm model = llm.get_model("mlx-community/Llama-3.2-3B-Instruct-4bit") print(model.prompt("hi").text()) MLX and mlx-lm

The secret sauce behind this new plugin is Apple's MLX library, which as been improving at an extraordinary pace over the past year - it first launched on GitHub just in November of 2023.

The core library is C++, but the MLX team at Apple also maintain a mlx-examples repo with a wealth of Python examples, including the mlx-lm and mlx-whisper packages.

The community around it is growing too. I'm particularly impressed by Prince Canuma's mlx-vlm library for accessing multi-modal vision LLMs - I'd love to get that working as an LLM plugin once I figure out how to use it for conversations.

I've used MLX for a few experiments in the past, but this tweet from MLX core developer Awni Hannun finally convinced me to wrap it up as an LLM plugin:

In the latest MLX small LLMs are a lot faster.

On M4 Max 4-bit Qwen 0.5B generates 1k tokens at a whopping 510 toks/sec. And runs at over 150 tok/sec on iPhone 16 pro.

This is really good software. This small team at Apple appear to be almost single-handedly giving NVIDIA's CUDA a run for their money!

Building the plugin

The llm-mlx plugin came together pretty quickly. The first version was ~100 lines of Python, much of it repurposed from my existing llm-gguf plugin.

The hardest problem was figuring out how to hide the Hugging Face progress bars that displayed every time it attempted to access a model!

I eventually found the from huggingface_hub.utils import disable_progress_bars utility function by piping library code through Gemini 2.0.

I then added model options support allowing you to pass options like this:

llm -m l32 'a greeting' -o temperature 1.0 -o seed 2

So far using a fixed seed appears to produce repeatable results, which is exciting for writing more predictable tests in the future.

For the automated tests that run in GitHub Actions I decided to use a small model - I went with the tiny 75MB mlx-community/SmolLM-135M-Instruct-4bit (explored previously). I configured GitHub Actions to cache the model in between CI runs by adding the following YAML to my .github/workflows/test.yml file:

- name: Cache models uses: actions/cache@v4 with: path: ~/.cache/huggingface key: ${{ runner.os }}-huggingface-

Tags: apple, plugins, projects, ai, github-actions, generative-ai, llms, llm, mlx


John Philpin : Lifestream

🖇️ Should We Cry For Argentina? … my latest newsletter if yo

🖇️ Should We Cry For Argentina? … my latest newsletter if you are interested. A bit different to my usual newsletter themes.

🖇️ Should We Cry For Argentina? … my latest newsletter if you are interested. A bit different to my usual newsletter themes.


A bully is a felony waiting to happen. 💬 Dexter

A bully is a felony waiting to happen. 💬 Dexter

A bully is a felony waiting to happen.

💬 Dexter


🗺️ 🚘 📸 👀 Road Trip

🗺️ 🚘 📸 👀 Road Trip

🗺️ 🚘 📸 👀

Road Trip


🕵💬 Inspired By People | 🌐 Rutherford B. Hayes The Full

🕵💬 Inspired By People | 🌐 Rutherford B. Hayes The Full Collection : Visual Scroll | 🔍 List Of Posts

🕵💬 Inspired By People | 🌐 Rutherford B. Hayes

The Full Collection : Visual Scroll | 🔍 List Of Posts


“She knows it’s someone on the inside.“ Isn’t it alway

“She knows it’s someone on the inside.“ Isn’t it always?

“She knows it’s someone on the inside.“

Isn’t it always?


Boo Ya

Exploring Options and Testing Assumptions

I know. Cheating!


🔗📸 Well. Who knew? - and ‘just’ down the road apparently.

🔗📸 Well. Who knew? - and ‘just’ down the road apparently.

🔗📸 Well. Who knew? - and ‘just’ down the road apparently.

Friday, 14. February 2025

John Philpin : Lifestream

💬

💬

💬


Bill Wendels Real Estate Cafe

Multiply Tiny House Love Story with Million Backyard March

After a post about a college that’s teaching students how to build their own tiny houses for just $5,000 drew a lot of attention, decided… The post Multiply Tiny House Love Story with Million Backyard March first appeared on Real Estate Cafe.

After a post about a college that’s teaching students how to build their own tiny houses for just $5,000 drew a lot of attention, decided…

The post Multiply Tiny House Love Story with Million Backyard March first appeared on Real Estate Cafe.

John Philpin : Lifestream

David Frum is not wrong … 🔗 The ‘Gulf of America’ Is an Ad

David Frum is not wrong … 🔗 The ‘Gulf of America’ Is an Admission of Defeat

This Is Not A Long Form Post ..

A post that points out that all is not what it seems.

.. I know it looks like one - but it isn’t. I am just experimenting - move along now and sincere apologies if I distracted you.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius sollicitudin consequat. Etiam cursus blandit nisl accumsan fermentum. Phasellus faucibus velit non porttitor tincidunt. Ut quis erat ac nibh auctor tempus. Sed a metus sed dui pulvinar dapibus pulvinar et nisl. Sed consectetur, magna sit amet vestibulum dapibus, augue orci dignissim nulla, nec interdum ligula nibh at dui. In in dolor sit amet urna tempor pulvinar. In ut odio et ligula faucibus placerat. Proin pulvinar ex et sagittis molestie. Vestibulum dignissim faucibus diam, quis lacinia lacus mollis et. In fermentum ex quis consectetur semper. Nullam ut metus quam. Suspendisse potenti.


🕵💬 Inspired By People | 🌐 John Stuart Mill The Full Col

🕵💬 Inspired By People | 🌐 John Stuart Mill The Full Collection : Visual Scroll | 🔍 List Of Posts

🕵💬 Inspired By People | 🌐 John Stuart Mill

The Full Collection : Visual Scroll | 🔍 List Of Posts


Simon Willison

files-to-prompt 0.5

files-to-prompt 0.5 My files-to-prompt tool (originally built using Claude 3 Opus back in April) had been accumulating a bunch of issues and PRs - I finally got around to spending some time with it and pushed a fresh release: New -n/--line-numbers flag for including line numbers in the output. Thanks, Dan Clayton. #38 Fix for utf-8 handling on Windows. Thanks, David Jarman. #36 --ignore

files-to-prompt 0.5

My files-to-prompt tool (originally built using Claude 3 Opus back in April) had been accumulating a bunch of issues and PRs - I finally got around to spending some time with it and pushed a fresh release:

New -n/--line-numbers flag for including line numbers in the output. Thanks, Dan Clayton. #38 Fix for utf-8 handling on Windows. Thanks, David Jarman. #36 --ignore patterns are now matched against directory names as well as file names, unless you pass the new --ignore-files-only flag. Thanks, Nick Powell. #30

I use this tool myself on an almost daily basis - it's fantastic for quickly answering questions about code. Recently I've been plugging it into Gemini 2.0 with its 2 million token context length, running recipes like this one:

git clone https://github.com/bytecodealliance/componentize-py cd componentize-py files-to-prompt . -c | llm -m gemini-2.0-pro-exp-02-05 \ -s 'How does this work? Does it include a python compiler or AST trick of some sort?'

I ran that question against the bytecodealliance/componentize-py repo - which provides a tool for turning Python code into compiled WASM - and got this really useful answer.

Here's another example. I decided to have o3-mini review how Datasette handles concurrent SQLite connections from async Python code - so I ran this:

git clone https://github.com/simonw/datasette cd datasette/datasette files-to-prompt database.py utils/__init__.py -c | \ llm -m o3-mini -o reasoning_effort high \ -s 'Output in markdown a detailed analysis of how this code handles the challenge of running SQLite queries from a Python asyncio application. Explain how it works in the first section, then explore the pros and cons of this design. In a final section propose alternative mechanisms that might work better.'

Here's the result. It did an extremely good job of explaining how my code works - despite being fed just the Python and none of the other documentation. Then it made some solid recommendations for potential alternatives.

I added a couple of follow-up questions (using llm -c) which resulted in a full working prototype of an alternative threadpool mechanism, plus some benchmarks.

One final example: I decided to see if there were any undocumented features in Litestream, so I checked out the repo and ran a prompt against just the .go files in that project:

git clone https://github.com/benbjohnson/litestream cd litestream files-to-prompt . -e go -c | llm -m o3-mini \ -s 'Write extensive user documentation for this project in markdown'

Once again, o3-mini provided a really impressively detailed set of unofficial documentation derived purely from reading the source.

Tags: projects, llms, gemini, llm, ai-assisted-programming, generative-ai, ai, webassembly, python, async, datasette, sqlite, litestream


How to add a directory to your PATH

How to add a directory to your PATH Classic Julia Evans piece here, answering a question which you might assume is obvious but very much isn't. Plenty of useful tips in here, plus the best explanation I've ever seen of the three different Bash configuration options: Bash has three possible config files: ~/.bashrc, ~/.bash_profile, and ~/.profile. If you're not sure which one your system i

How to add a directory to your PATH

Classic Julia Evans piece here, answering a question which you might assume is obvious but very much isn't.

Plenty of useful tips in here, plus the best explanation I've ever seen of the three different Bash configuration options:

Bash has three possible config files: ~/.bashrc, ~/.bash_profile, and ~/.profile.

If you're not sure which one your system is set up to use, I'd recommend testing this way:

add echo hi there to your ~/.bashrc Restart your terminal If you see "hi there", that means ~/.bashrc is being used! Hooray! Otherwise remove it and try the same thing with ~/.bash_profile You can also try ~/.profile if the first two options don't work.

This article also reminded me to try which -a again, which gave me this confusing result for datasette:

% which -a datasette /opt/homebrew/Caskroom/miniconda/base/bin/datasette /Users/simon/.local/bin/datasette /Users/simon/.local/bin/datasette

Why is the second path in there twice? I figured out how to use rg to search just the dot-files in my home directory:

rg local/bin -g '/.*' --max-depth 1

And found that I have both a .zshrc and .zprofile file that are adding that to my path:

.zshrc.backup 4:export PATH="$PATH:/Users/simon/.local/bin" .zprofile 5:export PATH="$PATH:/Users/simon/.local/bin" .zshrc 7:export PATH="$PATH:/Users/simon/.local/bin"

Tags: julia-evans, zsh, bash, ripgrep

Thursday, 13. February 2025

Simon Willison

shot-scraper 1.6 with support for HTTP Archives

shot-scraper 1.6 with support for HTTP Archives New release of my shot-scraper CLI tool for taking screenshots and scraping web pages. The big new feature is HTTP Archive (HAR) support. The new shot-scraper har command can now create an archive of a page and all of its dependents like this: shot-scraper har https://datasette.io/ This produces a datasette-io.har file (currently 163KB) which

shot-scraper 1.6 with support for HTTP Archives

New release of my shot-scraper CLI tool for taking screenshots and scraping web pages.

The big new feature is HTTP Archive (HAR) support. The new shot-scraper har command can now create an archive of a page and all of its dependents like this:

shot-scraper har https://datasette.io/

This produces a datasette-io.har file (currently 163KB) which is JSON representing the full set of requests used to render that page. Here's a copy of that file. You can visualize that here using ericduran.github.io/chromeHAR.

That JSON includes full copies of all of the responses, base64 encoded if they are binary files such as images.

You can add the --zip flag to instead get a datasette-io.har.zip file, containing JSON data in har.har but with the response bodies saved as separate files in that archive.

The shot-scraper multi command lets you run shot-scraper against multiple URLs in sequence, specified using a YAML file. That command now takes a --har option (or --har-zip or --har-file name-of-file), described in the documentation, which will produce a HAR at the same time as taking the screenshots.

Shots are usually defined in YAML that looks like this:

- output: example.com.png url: http://www.example.com/ - output: w3c.org.png url: https://www.w3.org/

You can now omit the output: keys and generate a HAR file without taking any screenshots at all:

- url: http://www.example.com/ - url: https://www.w3.org/

Run like this:

shot-scraper multi shots.yml --har

Which outputs:

Skipping screenshot of 'https://www.example.com/' Skipping screenshot of 'https://www.w3.org/' Wrote to HAR file: trace.har

shot-scraper is built on top of Playwright, and the new features use the browser.new_context(record_har_path=...) parameter.

Tags: projects, shot-scraper, playwright, python, scraping


John Philpin : Lifestream

If someone wants to unlock a stolen phone – or retrieve mo

If someone wants to unlock a stolen phone – or retrieve money from an ATM – and only have five guesses, this data suggests they still have a one-in-eight chance of guessing correctly. 💬 Nathan Yau - Flowing Data 🔗 The Complete Article

If someone wants to unlock a stolen phone – or retrieve money from an ATM – and only have five guesses, this data suggests they still have a one-in-eight chance of guessing correctly.

💬 Nathan Yau - Flowing Data

🔗 The Complete Article


The Pragmatic Engineer

The Pulse #124: Software engineering job openings at five-year low?

Data from Indeed shows software developer job openings have seen the biggest decline in five years across the US. What’s the cause, and what’s next? Also: OpenAI responds to DeepSeek, and more.

The Pulse is a series covering insights, patterns, and trends within Big Tech and startups. Notice an interesting event or trend? Send me a message.

Today, we cover:

Industry pulse. OpenAI struggles to shed nonprofit status, Anthropic bans AI from job applications, cuts at Workday, GitHub Copilot releases an agentic mode, and Linus Torvalds tells Linux contributors that social media pressure is bad for development.

Software engineering job openings hit five-year low? There are 35% fewer software developer job listings on Indeed today, than five years ago. Compared to other industries, job listings for software engineers grew much more in 2021-2022, but have declined much faster since. A look into possible reasons for this, and what could come next.

OpenAI responds to DeepSeek threat. Fresh off the shock of a relatively unknown Chinese company dethroning ChatGPT as the most-downloaded AI app on iPhone and Android, OpenAI has shaken itself up, promptly copied DeepSeek’s visualization of how its reasoning model “thinks”, and has shipped Deep Research.

A glimpse from the section “Software engineering job openings hit five-year low?” OpenAI struggles to shed nonprofit status

Yet more drama at OpenAI, where cofounder Elon Musk has made a $97 billion dollar bid to take over the OpenAI nonprofit. A few details to unpack:

Yes, Musk really is one of the several cofounders of OpenAI. In 2015 it was he, Sam Altman, and 9 others (Greg Brockman, Ilya Sutskever, John Schulman, Wojciech Zaremba, Trevor Blackwell, Vicki Cheung, Andrej Karpathy, Durk Kingma, and Pamela Vagata)

Musk contributed around $45M to OpenAI as a donor, as confirmed by OpenAI.

In 2017, things got messy and Musk eventually left OpenAI. This was the year when OpenAI decided to create a for-profit entity, controlled by the nonprofit. As shared by OpenAI, Musk wanted control over the for-profit part, and then later wanted to merge it into Tesla.

Musk created rival X.AI in 2023, and this company has raised $6B of funding.

OpenAI is worth a lot more than $97B; its latest valuation was at $157B in October, and there are rumors of a new raise at or above $300B!

Here’s where OpenAI’s tricky corporate structure comes into play. OpenAI published a diagram showcasing the structure, but leaving out ownership stakes. Here’s my interpretation, focusing on ownership stakes and control:

OpenAI’s ownership structure. It’s messy.

Musk is offering to buy the nonprofit entity, not the for-profit one. Musk’s offer at $97B for a 51% controlling share values OpenAI at around $195B, which is higher than OpenAI’s last valuation of $157B. The company’s board has a fiduciary duty to consider the offer. However, OpenAI is officially a non-profit, so this duty may not apply.

It’s likely that this episode’s main impact will be to highlight the ridiculous, convoluted, corporate structure of the world’s most valuable private company. I wonder if investors may opt against investing more until this structure is tidied up, with the for-profit entity controlled by investors, and not the nonprofit, with ` investors receiving an ownership stake as well.

Anthropic bans AI from job applications

Read more


John Philpin : Lifestream

I was thinking of posting a quick response analysis of 🖇️ th

I was thinking of posting a quick response analysis of 🖇️ this post from yesterday - but not yet.

I was thinking of posting a quick response analysis of 🖇️ this post from yesterday - but not yet.


Interesting to see my BlueSky cross post reach the micro.blo

Interesting to see my BlueSky cross post reach the micro.blog timeline before the native Micro Blog post.

Interesting to see my BlueSky cross post reach the micro.blog timeline before the native Micro Blog post.


🚧🕵💬 Inspired By People | 🌐 Mahatma Gandhi The Full Coll

🚧🕵💬 Inspired By People | 🌐 Mahatma Gandhi The Full Collection : Visual Scroll | 🔍 List Of Posts

🚧🕵💬 Inspired By People | 🌐 Mahatma Gandhi

The Full Collection : Visual Scroll | 🔍 List Of Posts


Ben Werdmüller

A streak, at last

It’s a small thing, but I broke my Apple Fitness longest streak this week. That means my consecutive number of days that I’ve hit my fitness goals on my Apple Watch has been longer than it’s ever been. Here’s why that’s meaningful: my previous longest streak was broken when my mother died, almost four years ago, after a ten-year terminal decline. For part of that time, I thought that my siste

It’s a small thing, but I broke my Apple Fitness longest streak this week. That means my consecutive number of days that I’ve hit my fitness goals on my Apple Watch has been longer than it’s ever been.

Here’s why that’s meaningful: my previous longest streak was broken when my mother died, almost four years ago, after a ten-year terminal decline. For part of that time, I thought that my sister and I might have the illness too, and I’ve watched four other members of my family follow the same journey. It’s been a hard decade or two, and I haven’t been together enough to manage any kind of streak since that awful week in the hospital. Until now.

I’m not saying that nature is healing — grief is with me every single day — but it feels like, in the midst of genuine crises at home, in my family, and in the world, at least something is going right.


Marshmallow Test and Parenting

[Sergey Bogdanov] This is a story about parenting, but also about the importance of considering context inclusively. We've all heard about the Stanford marshmallow experiment, but: "Kids from wealthier families waited longer than kids from low-income families. Not because they had more self-control, but because their environment made waiting feel safer. If you grow up knowin

[Sergey Bogdanov]

This is a story about parenting, but also about the importance of considering context inclusively. We've all heard about the Stanford marshmallow experiment, but:

"Kids from wealthier families waited longer than kids from low-income families. Not because they had more self-control, but because their environment made waiting feel safer. If you grow up knowing there will always be food on the table, waiting for an extra marshmallow isn’t a big deal. But if your life is more uncertain, grabbing what you can when you can make total sense. It’s a survival skill, not a lack of discipline."

It's not just about socioeconomic background; it's also, as the article points out, about building a culture of trust. That's important in families, but also in companies, and everywhere.

"So what’s the takeaway here? It’s simple, really: as parents, we set the tone. Our actions, promises, and reliability shape how our kids see the world. Are we building an environment where they feel safe enough to wait? Or are we teaching them that they need to grab what they can, when they can?"

What can we change to create emotional safety? How can we let them know they're protected? It really matters, in all walks of life.

#Parenting

[Link]


What Elon Musk's son in Trump's Oval Office tells us about politics and family

[Jennifer Gerson at The 19th] Musk has been seen with his child, X Æ A-Xii (or "Lil X" for short), at press conferences. But, as Jennifer Gerson notes here, it's not just a photo op. "Musk, a father of 12, is an avowed pronatalist, or someone who believes declining population rates are a major concern and has committed to work to remedy this by having as many children as pos

[Jennifer Gerson at The 19th]

Musk has been seen with his child, X Æ A-Xii (or "Lil X" for short), at press conferences. But, as Jennifer Gerson notes here, it's not just a photo op.

"Musk, a father of 12, is an avowed pronatalist, or someone who believes declining population rates are a major concern and has committed to work to remedy this by having as many children as possible. He sees part of his life’s work as repopulating the planet with as many children — and exceptional children at that — as possible."

It's also a wild double standard. Imagine the chorus of conservative mocking if a woman had done the same thing. That's not to say that children shouldn't be normalized at work - they really should - but what's happening in the current moment is hardly a symbol of radical inclusion.

"Pronatalism requires that people who are able to carry pregnancies — mostly women — be pregnant for large periods of time. These pregnancies can have a major impact on women’s participation in the workforce and economic mobility."

Finally, as Gerson points out, it's certainly worth mentioning that pro-natalists aren't just in favor of any kind of baby. They're heavy eugenicists, with a focus on certain characteristics, including retrograde ideas like potential IQ. Might this also include, in Musk's case, the 14 words? I couldn't possibly say.

#Democracy

[Link]


John Philpin : Lifestream

A hotel advertises ‘WiFi’ and then delivers this service

A hotel advertises ‘WiFi’ and then delivers this service What should my response be?

A hotel advertises ‘WiFi’ and then delivers this service

What should my response be?


@_Nat Zone

2月27日【緊急対談】ねむ ✕ 崎村夏彦 – AIメタバース時代のアイデンティティ【Digital Space Conference 2025】

2月27日、Digital Space Conference 2025 のサイドイベントで、昨年「今年最も輝いたVTuberベスト10 【MoguLive VTuber Award 2024】で、儒烏風亭らでんさんと同率4位に選出されたバーチャル美少女ねむさんと緊急対談を行います…

2月27日、Digital Space Conference 2025 のサイドイベントで、昨年「今年最も輝いたVTuberベスト10 【MoguLive VTuber Award 2024】で、儒烏風亭らでんさんと同率4位に選出されたバーチャル美少女ねむさんと緊急対談を行います。題して「ねむ ✕ 崎村夏彦 – AIメタバース時代のアイデンティティ」。

AIとメタバースの発展で激変するインターネットで新人類のID/アイデンティティはどこに向かうのか!?目が離せません

Digital Space Conference 2025 の会場でご覧いただけるほか、YouTube Live でも生配信します。ぜひお越しください。

出演: ■ バーチャル美少女ねむ(VTuber/作家)

黎明期の仮想世界で生きる「メタバース原住民」にして、その文化を伝える「メタバース文化エバンジェリスト」として活動。「バーチャルでなりたい自分になる」をテーマに2017年から美少女アイドルとして活動している自称・世界最古の個人系VTuber。ボイスチェンジャーの利用を公言しているにも関わらずオリジナル曲『ココロコスプレ』で歌手デビュー。メタバースの革命性を論じた著書『メタバース進化論』(2022年、技術評論社)で「ITエンジニア本大賞2023」ビジネス書部門”大賞”を受賞。国連の国際会議「IGF京都2023」でも登壇。アバター文化への貢献が認められ、一般社団法人VRMコンソーシアムよりキズナアイ以来史上二人目となる「アバターアワード2022 特別功労賞」受賞。
X : https://x.com/nemchan_nel

■崎村 夏彦(NATコンサルティング合同会社代表 / OpenID Foundation 理事長)

デジタルアイデンティティおよびプライバシーに関する国際標準化を専門とし、全世界で30億人以上に使われる一連の関連国際規格のほか、「デジタルアイデンティティ」(2021, 日経BP社)を著す。米国OpenID Foundation理事長を2011年より、MyData Japan理事長を2019年より、公正取引委員会デジタルスペシャルアドバイザーを2021年より務める。 ISO/IEC JTC 1/SC 27専門委員会(情報セキュリティ, サイバーセキュリティ及びプライバシー保護 アイデンティティ管理とプライバシー技術)委員長。OECDインターネット技術諮問委員会委員。総務省「プラットフォームに関する研究会」、デジタル庁「本人確認ガイドラインの改定に向けた有識者会議」を始めとして、多数の政府関連検討会にも参画。
X : https://x.com/_nat

■Digital Space Conference 2025 について

AI・Web3・メタバース領域の第一線で活躍するスピーカーが、成功の裏側や失敗から得た教訓を赤裸々に共有。来場者は、具体的な事例から得た示唆や新たな発見を持ち帰り、自身の事業に応用することで次世代を共に創造していく。単なる知識の獲得に留まらず、未来への一歩を踏み出すための場を提供します。
公式サイト:https://jdsef.or.jp/event/dsc2025
プレスリリース: https://prtimes.jp/main/html/rd/p/000000020.000125406.html

■日本デジタル空間経済連盟

デジタル空間における経済活動を活性化し、日本経済の健全な発展と豊かな国民生活の実現に寄与します。
X : https://x.com/Dejikeiren


Simon Willison

python-build-standalone now has Python 3.14.0a5

python-build-standalone now has Python 3.14.0a5 Exciting news from Charlie Marsh: We just shipped the latest Python 3.14 alpha (3.14.0a5) to uv and python-build-standalone. This is the first release that includes the tail-calling interpreter. Our initial benchmarks show a ~20-30% performance improvement across CPython. This is an optimization that was first discussed in faster-cpython i

python-build-standalone now has Python 3.14.0a5

Exciting news from Charlie Marsh:

We just shipped the latest Python 3.14 alpha (3.14.0a5) to uv and python-build-standalone. This is the first release that includes the tail-calling interpreter.

Our initial benchmarks show a ~20-30% performance improvement across CPython.

This is an optimization that was first discussed in faster-cpython in January 2024, then landed earlier this month by Ken Jin and included in the 3.14a05 release. The alpha release notes say:

A new type of interpreter based on tail calls has been added to CPython. For certain newer compilers, this interpreter provides significantly better performance. Preliminary numbers on our machines suggest anywhere from -3% to 30% faster Python code, and a geometric mean of 9-15% faster on pyperformance depending on platform and architecture. The baseline is Python 3.14 built with Clang 19 without this new interpreter.

This interpreter currently only works with Clang 19 and newer on x86-64 and AArch64 architectures. However, we expect that a future release of GCC will support this as well.

Including this in python-build-standalone means it's now trivial to try out via uv. I upgraded to the latest uv like this:

pip install -U uv

Then ran uv python list to see the available versions:

cpython-3.14.0a5+freethreaded-macos-aarch64-none <download available> cpython-3.14.0a5-macos-aarch64-none <download available> cpython-3.13.2+freethreaded-macos-aarch64-none <download available> cpython-3.13.2-macos-aarch64-none <download available> cpython-3.13.1-macos-aarch64-none /opt/homebrew/opt/python@3.13/bin/python3.13 -> ../Frameworks/Python.framework/Versions/3.13/bin/python3.13

I downloaded the new alpha like this:

uv python install cpython-3.14.0a5

And tried it out like so:

uv run --python 3.14.0a5 python

The Astral team have been using Ken's bm_pystones.py benchmarks script. I grabbed a copy like this:

wget 'https://gist.githubusercontent.com/Fidget-Spinner/e7bf204bf605680b0fc1540fe3777acf/raw/fa85c0f3464021a683245f075505860db5e8ba6b/bm_pystones.py'

And ran it with uv:

uv run --python 3.14.0a5 bm_pystones.py

Giving:

Pystone(1.1) time for 50000 passes = 0.0511138 This machine benchmarks at 978209 pystones/second

Inspired by Charlie's example I decided to try the hyperfine benchmarking tool, which can run multiple commands to statistically compare their performance. I came up with this recipe:

brew install hyperfine hyperfine \ "uv run --python 3.14.0a5 bm_pystones.py" \ "uv run --python 3.13 bm_pystones.py" \ -n tail-calling \ -n baseline \ --warmup 10

So 3.14.0a5 scored 1.12 times faster than 3.13 on the benchmark (on my extremely overloaded M2 MacBook Pro).

Tags: uv, astral, benchmarks, python


URL-addressable Pyodide Python environments

This evening I spotted an obscure bug in Datasette, using Datasette Lite. I figure it's a good opportunity to highlight how useful it is to have a URL-addressable Python environment, powered by Pyodide and WebAssembly. Here's the page that helped me discover the bug: https://lite.datasette.io/?install=datasette-visible-internal-db&ref=1.0a17#/_internal/catalog_columns?_facet=database_name

This evening I spotted an obscure bug in Datasette, using Datasette Lite. I figure it's a good opportunity to highlight how useful it is to have a URL-addressable Python environment, powered by Pyodide and WebAssembly.

Here's the page that helped me discover the bug:

https://lite.datasette.io/?install=datasette-visible-internal-db&ref=1.0a17#/_internal/catalog_columns?_facet=database_name

To explain what's going on here, let's first review the individual components.

Datasette Lite The Datasette 1.0 alphas This works for plugins, too datasette-visible-internal-db Spotting the bug Fixing the bug URL-addressable Steps To Reproduce Datasette Lite

Datasette Lite is a version of Datasette that runs entirely in your browser. It runs on Pyodide, which I think is still the most underappreciated project in the Python ecosystem.

I built Datasette Lite almost three years ago as a weekend hack project to try and see if I could get Datasette - a server-side Python web application - to run entirely in the browser.

I've added a bunch of features since then, described in the README - most significantly the ability to load SQLite databases, CSV files, JSON files or Parquet files by passing a URL to a query string parameter.

I built Datasette Lite almost as a joke, thinking nobody would want to wait for a full Python interpreter to download to their browser each time they wanted to explore some data. It turns out internet connections are fast these days and having a version of Datasette that needs a browser, GitHub Pages and nothing else is actually extremely useful.

Just the other day I saw Logan Williams of Bellingcat using it to share a better version of this Excel sheet:

The NSF grants that Ted Cruz has singled out for advancing "neo-Marxist class warfare propaganda," in Datasette-Lite: lite.datasette.io?url=https://...

Let's look at that URL in full:

https://lite.datasette.io/?url=https://data-house-lake.nyc3.cdn.digitaloceanspaces.com/cruz_nhs.db#/cruz_nhs/grants

The ?url= parameter there poins to a SQLite database file, hosted on DigitalOcean Spaces and served with the all-important access-control-allow-origin: * header which allows Datasette Lite to load it across domains.

The #/cruz_nhs/grants part of the URL tells Datasette Lite which page to load when you visit the link.

Anything after the # in Datasette Lite is a URL that gets passed on to the WebAssembly-hosted Datasette instance. Any query string items before that can be used to affect the initial state of the Datasette instance, to import data or even to install additional plugins.

The Datasette 1.0 alphas

I've shipped a lot of Datasette alphas - the most recent is Datasette 1.0a17. Those alphas get published to PyPI, which means they can be installed using pip install datasette==1.0a17.

A while back I added the same ability to Datasette Lite itself. You can now pass &ref=1.0a17 to the Datasette Lite URL to load that specific version of Datasette.

This works thanks to the magic of Pyodide's micropip mechanism. Every time you load Datasette Lite in your browser it's actually using micropip to install the packages it needs directly from PyPI. The code looks something like this:

await pyodide.loadPackage('micropip', {messageCallback: log}); let datasetteToInstall = 'datasette'; let pre = 'False'; if (settings.ref) { if (settings.ref == 'pre') { pre = 'True'; } else { datasetteToInstall = `datasette==${settings.ref}`; } } await self.pyodide.runPythonAsync(` import micropip await micropip.install("${datasetteToInstall}", pre=${pre}) `);

Full code here.

That settings object has been passed to the Web Worker that loads Datasette, incorporating various query string parameters.

This all means I can pass ?ref=1.0a17 to Datasette Lite to load a specific version, or ?ref=pre to get the most recently released pre-release version.

This works for plugins, too

Since loading extra packages from PyPI via micropip is so easy, I went a step further and added plugin support.

The ?install= parameter can be passed multiple times, each time specifying a Datasette plugin from PyPI that should be installed into the browser.

The README includes a bunch of examples of this mechanism in action. Here's a fun one that loads datasette-mp3-audio to provide inline MP3 playing widgets, originally created for my ScotRail audio announcements project.

This only works for some plugins. They need to be pure Python wheels - getting plugins with compiled binary dependencies to work in Pyodide WebAssembly requires a whole set of steps that I haven't quite figured out.

Frustratingly, it doesn't work for plugins that run their own JavaScript yet! I may need to rearchitect significant chunks of both Datasette and Datasette Lite to make that work.

It's also worth noting that this is a remote code execution security hole. I don't think that's a problem here, because lite.datasette.io is deliberately hosted on the subdomain of a domain that I never intend to use cookies on. It's possible to vandalize the visual display of lite.datasette.io but it shouldn't be possible to steal any private data or do any lasting damage.

datasette-visible-internal-db

This evening's debugging exercise used a plugin called datasette-visible-internal-db.

Datasette's internal database is an invisible SQLite database that sits at the heart of Datasette, tracking things like loaded metadata and the schemas of the currently attached tables.

Being invisible means we can use it for features that shouldn't be visible to users - plugins that record API secrets or permissions or track comments or data import progress, for example.

In Python code it's accessed like this:

internal_db = datasette.get_internal_database()

As opposed to Datasette's other databases which are accessed like so:

db = datasette.get_database("my-database")

Sometimes, when hacking on Datasette, it's useful to be able to browse the internal database using the default Datasette UI.

That's what datasette-visible-internal-db does. The plugin implementation is just five lines of code:

import datasette @datasette.hookimpl def startup(datasette): db = datasette.get_internal_database() datasette.add_database(db, name="_internal", route="_internal")

On startup the plugin grabs a reference to that internal database and then registers it using Datasette's add_database() method. That's all it takes to have it show up as a visible database on the /_internal path within Datasette.

Spotting the bug

I was poking around with this today out of pure curiosity - I hadn't tried ?install=datasette-visible-internal-db with Datasette Lite before and I wanted to see if it worked.

Here's that URL from earlier, this time with commentary:

https://lite.datasette.io/ // Datasette Lite ?install=datasette-visible-internal-db // Install the visible internal DB plugin &ref=1.0a17 // Load the 1.0a17 alpha release #/_internal/catalog_columns // Navigate to the /_internal/catalog_columns table page &_facet=database_name // Facet by database_name for good measure

And this is what I saw:

This all looked good... until I clicked on that _internal link in the database_name column... and it took me to this /_internal/databases/_internal 404 page.

Why was that a 404? Datasette introspects the SQLite table schema to identify foreign key relationships, then turns those into hyperlinks. The SQL schema for that catalog_columns table (displayed at the bottom of the table page) looked like this:

CREATE TABLE catalog_columns ( database_name TEXT, table_name TEXT, cid INTEGER, name TEXT, type TEXT, "notnull" INTEGER, default_value TEXT, -- renamed from dflt_value is_pk INTEGER, -- renamed from pk hidden INTEGER, PRIMARY KEY (database_name, table_name, name), FOREIGN KEY (database_name) REFERENCES databases(database_name), FOREIGN KEY (database_name, table_name) REFERENCES tables(database_name, table_name) );

Those foreign key references are a bug! I renamed the internal tables from databases and tables to catalog_databases and catalog_tables quite a while ago, but apparently forgot to update the references - and SQLite let me get away with it.

Fixing the bug

I fixed the bug in this commit. As is often the case the most interesting part of the fix is the accompanying test. I decided to use the introspection helpers in sqlite-utils to guard against every making another mistake like this again in the future:

@pytest.mark.asyncio async def test_internal_foreign_key_references(ds_client): internal_db = await ensure_internal(ds_client) def inner(conn): db = sqlite_utils.Database(conn) table_names = db.table_names() for table in db.tables: for fk in table.foreign_keys: other_table = fk.other_table other_column = fk.other_column message = 'Column "{}.{}" references other column "{}.{}" which does not exist'.format( table.name, fk.column, other_table, other_column ) assert other_table in table_names, message + " (bad table)" assert other_column in db[other_table].columns_dict, ( message + " (bad column)" ) await internal_db.execute_fn(inner)

This uses Datasette's await db.execute_fn() method, which lets you run Python code that accesses SQLite in a thread. That code can then use the blocking sqlite-utils introspection methods - here I'm looping through every table in that internal database, looping through each tables .foreign_keys and confirming that the .other_table and .other_column values reference a table and column that genuinely exist.

I ran this test, watched it fail, then applied the fix and it passed.

URL-addressable Steps To Reproduce

The idea I most wanted to highlight here is the enormous value provided by URL-addressable Steps To Reproduce.

Having good Steps To Reproduce is crucial for productively fixing bugs. Something you can click on to see the bug is the most effective form of STR there is.

Ideally, these URLs will continue to work long into the future.

The great thing about a system like Datasette Lite is that everything is statically hosted files. The application itself is hosted on GitHub Pages, and it works by loading additional files from various different CDNs. The only dynamic aspect is cached lookups against the PyPI API, which I expect to stay stable for a long time to come.

As a stable component of the Web platform for almost 8 years WebAssembly is clearly here to stay. I expect we'll be able to execute today's WASM code in browsers 20+ years from now.

I'm confident that the patterns I've been exploring in Datasette Lite over the past few years could be just as valuable for other projects. Imagine demonstrating bugs in a Django application using a static WebAssembly build, archived forever as part of an issue tracking system.

I think WebAssembly and Pyodide still have a great deal of untapped potential for the wider Python world.

Tags: python, urls, datasette, webassembly, pyodide, datasette-lite

Wednesday, 12. February 2025

Simon Willison

Quoting Sam Altman

We want AI to “just work” for you; we realize how complicated our model and product offerings have gotten. We hate the model picker as much as you do and want to return to magic unified intelligence. We will next ship GPT-4.5, the model we called Orion internally, as our last non-chain-of-thought model. After that, a top goal for us is to unify o-series models and GPT-series models by creat

We want AI to “just work” for you; we realize how complicated our model and product offerings have gotten.

We hate the model picker as much as you do and want to return to magic unified intelligence.

We will next ship GPT-4.5, the model we called Orion internally, as our last non-chain-of-thought model.

After that, a top goal for us is to unify o-series models and GPT-series models by creating systems that can use all our tools, know when to think for a long time or not, and generally be useful for a very wide range of tasks.

In both ChatGPT and our API, we will release GPT-5 as a system that integrates a lot of our technology, including o3. We will no longer ship o3 as a standalone model.

[When asked about release dates for GPT 4.5 / GPT 5:] weeks / months

Sam Altman

Tags: generative-ai, openai, o3, chatgpt, ai, llms, sam-altman


Nomic Embed Text V2: An Open Source, Multilingual, Mixture-of-Experts Embedding Model

Nomic Embed Text V2: An Open Source, Multilingual, Mixture-of-Experts Embedding Model Nomic continue to release the most interesting and powerful embedding models. Their latest is Embed Text V2, an Apache 2.0 licensed multi-lingual 1.9GB model (here it is on Hugging Face) trained on "1.6 billion high-quality data pairs", which is the first embedding model I've seen to use a Mixture of Experts arc

Nomic Embed Text V2: An Open Source, Multilingual, Mixture-of-Experts Embedding Model

Nomic continue to release the most interesting and powerful embedding models. Their latest is Embed Text V2, an Apache 2.0 licensed multi-lingual 1.9GB model (here it is on Hugging Face) trained on "1.6 billion high-quality data pairs", which is the first embedding model I've seen to use a Mixture of Experts architecture:

In our experiments, we found that alternating MoE layers with 8 experts and top-2 routing provides the optimal balance between performance and efficiency. This results in 475M total parameters in the model, but only 305M active during training and inference.

I first tried it out using uv run like this:

uv run \ --with einops \ --with sentence-transformers \ --python 3.13 python

Then:

from sentence_transformers import SentenceTransformer model = SentenceTransformer("nomic-ai/nomic-embed-text-v2-moe", trust_remote_code=True) sentences = ["Hello!", "¡Hola!"] embeddings = model.encode(sentences, prompt_name="passage") print(embeddings)

Then I got it working on my laptop using the llm-sentence-tranformers plugin like this:

llm install llm-sentence-transformers llm install einops # additional necessary package llm sentence-transformers register nomic-ai/nomic-embed-text-v2-moe --trust-remote-code llm embed -m sentence-transformers/nomic-ai/nomic-embed-text-v2-moe -c 'string to embed'

This outputs a 768 item JSON array of floating point numbers to the terminal. These are Matryoshka embeddings which means you can truncate that down to just the first 256 items and get similarity calculations that still work albeit slightly less well.

To use this for RAG you'll need to conform to Nomic's custom prompt format. For documents to be searched:

search_document: text of document goes here

And for search queries:

search_query: term to search for

I landed a new --prepend option for the llm embed-multi command to help with that, but it's not out in a full release just yet.

I also released llm-sentence-transformers 0.3 with some minor improvements to make running this model more smooth.

Via @nomic_ai

Tags: embeddings, llm, nomic, ai, rag, uv, python


Building a SNAP LLM eval: part 1

Building a SNAP LLM eval: part 1 Dave Guarino (previously) has been exploring using LLM-driven systems to help people apply for SNAP, the US Supplemental Nutrition Assistance Program (aka food stamps). This is a domain which existing models know some things about, but which is full of critical details around things like eligibility criteria where accuracy really matters. Domain-specific evals

Building a SNAP LLM eval: part 1

Dave Guarino (previously) has been exploring using LLM-driven systems to help people apply for SNAP, the US Supplemental Nutrition Assistance Program (aka food stamps).

This is a domain which existing models know some things about, but which is full of critical details around things like eligibility criteria where accuracy really matters.

Domain-specific evals like this are still pretty rare. As Dave puts it:

There is also not a lot of public, easily digestible writing out there on building evals in specific domains. So one of our hopes in sharing this is that it helps others build evals for domains they know deeply.

Having robust evals addresses multiple challenges. The first is establishing how good the raw models are for a particular domain. A more important one is to help in developing additional systems on top of these models, where an eval is crucial for understanding if RAG or prompt engineering tricks are paying off.

Step 1 doesn't involve writing any code at all:

Meaningful, real problem spaces inevitably have a lot of nuance. So in working on our SNAP eval, the first step has just been using lots of models — a lot. [...]

Just using the models and taking notes on the nuanced “good”, “meh”, “bad!” is a much faster way to get to a useful starting eval set than writing or automating evals in code.

I've been complaining for a while that there isn't nearly enough guidance about evals out there. This piece is an excellent step towards filling that gap.

Tags: evals, llms, ai, generative-ai


The Pragmatic Engineer

Live streaming at world-record scale with Ashutosh Agrawal

In May 2023, a live streaming world record was set with 32 million concurrent viewers watching the finale of the Indian Premier League cricket finale. A chat with the architect behind this system
Stream the Latest Episode

Available now on YouTube, Apple and Spotify. See the episode transcript at the top of this page, and a summary at the bottom.

Brought to You By

WorkOS — The modern identity platform for B2B SaaS

CodeRabbit — Cut code review time and bugs in half. Use the code PRAGMATIC to get one month free.

Augment Code — AI coding assistant that pro engineering teams love

In This Episode

How do you architect a live streaming system to deal with more load than any similar system has dealt with before? Today, we hear from an architect of such a system: Ashutosh Agrawal, formerly Chief Architect of JioCinema (and currently Staff Software Engineer at Google DeepMind.) In May 2023, JioCinema set the live-streaming world record, serving 32 million concurrent viewers tuning in to the finale of Indian Premier League (a cricket game.)

We take a deep dive into video streaming architecture, tackling the complexities of live streaming at scale (at tens of millions of parallel streams) and the challenges engineers face in delivering seamless experiences. We talk about the following topics:

• How large-scale live streaming architectures are designed

• Tradeoffs in optimizing performance

• Early warning signs of streaming failures and how to detect them

• Why capacity planning for streaming is SO difficult

• The technical hurdles of streaming in APAC regions

• Why Ashutosh hates APMs (Application Performance Management systems)

• Ashutosh’s advice for those looking to improve their systems design expertise

• And much more!

Takeaways

My biggest takeaways from this episode:

1. The architecture behind live streaming systems is surprisingly logical. In the episode, Ashutosh explains how the live streaming system works, starting from the physical cameras on-site, through the production control room (PCR), streams being sliced-and-diced, and the HLS protocol (HTTP Live Streaming) used.

2. There are a LOT of tradeoffs you can play with when live streaming! The tradeoffs between server load, latency, server resources vs client caching are hard decisions to make. Want to reduce the server load? Serve longer chunks to clients, resulting in fewer requests per minute, per client… at the expense of clients potentially lagging more behind. This is just one of many possible decisions to make.

3. At massive video streaming scale, capacity planning can start a year ahead! It was surprising to hear how Ashutosh had to convince with telecoms and data centers to invest more in their server infrastructure, so they can handle the load, come peak viewership months later. This kind of challenge will be nonexistent for most of us engineers/ Still, it’s interesting to consider that when you are serving a scale that’s not been done before, you need to worry about the underlying infra!

4. “Game day” is such a neat load testing concept. The team at Jio would simulate “game day” load months before the event. They did tell teams when the load test will start: but did not share anything else! Preparing for a “Game day” test is a lot of work, but it can pay off to find parts of the system that shutter under extreme load.

The Pragmatic Engineer deepdives relevant for this episode

Software architect archetypes

Engineering leadership skill set overlaps

Software architecture with Grady Booch

Timestamps

(00:00) Intro

(01:28) The world record-breaking live stream and how support works with live events

(05:57) An overview of streaming architecture

(21:48) The differences between internet streaming and traditional television.l

(22:26) How adaptive bitrate streaming works

(25:30) How throttling works on the mobile tower side

(27:46) Leading indicators of streaming problems and the data visualization needed

(31:03) How metrics are set

(33:38) Best practices for capacity planning

(35:50) Which resources are planned for in capacity planning

(37:10) How streaming services plan for future live events with vendors

(41:01) APAC specific challenges

(44:48) Horizontal scaling vs. vertical scaling

(46:10) Why auto-scaling doesn’t work

(47:30) Concurrency: the golden metric to scale against

(48:17) User journeys that cause problems

(49:59) Recommendations for learning more about video streaming

(51:11) How Ashutosh learned on the job

(55:21) Advice for engineers who would like to get better at systems

(1:00:10) Rapid fire round

A summary of the conversation The Live Streaming Pipeline

The journey of a live stream starts with the cameras at the event’s venue. These cameras are connected by fiber to a Production Control Room (PCR).

In the PCR, a director selects which camera feeds to use, much like in a movie production.

Source feed (or production feed) is then sent to a contribution encoder. This encoder compresses the high-bandwidth source feed to a more manageable size.

The compressed feed is then transmitted to the cloud using a private peer-to-peer link.

Distribution encoder: prepares the stream in various formats for end-user consumption, such as HLS and DASH.

Over 100 stream variants can be generated for various devices – and up to 500 (!) when different languages are included.

Orchestrator: the one managing the pipeline, from the contribution encoding to the cloud infrastructure. The orchestrator decides which endpoints to push to, the configuration of the distribution encoder, and the CDN endpoints.

Playback URLs: generated by the orchestrator. URLs are specific to the device and format being used.

When a user clicks play, a separate playback system takes over. This system verifies user authorization, deals with encryption, and handles Digital Rights Management (DRM). The playback system then provides the client app with an encrypted URL to stream the content.

Live streaming systems are more complex than Video on Demand (VOD) systems because of the need to manage multiple real-time streams and user authentication and authorization for those streams, all while keeping latency low.

Content Delivery

Content delivery relies on Content Delivery Networks (CDNs).

The core technology used is HLS or DASH, where the video is broken down into segments.

HLS uses a master manifest file (e.g., master.m3u8) that lists different video quality levels. Each quality level refers to a child manifest.

Child manifests list individual video segments. These segments are typically between four to six seconds long.

The client player requests a child manifest every segment duration and the segments that it lists.

CDN: works at the segment level rather than at a millisecond level.

Correctly setting up CDN configurations, such as the Time To Live (TTL) values for the cached segments, is crucial to ensure a smooth stream without stale data.

Latency is introduced at various stages of the live-streaming process. This includes encoding, network transmission, and client-side buffering.

Encoding techniques: using a look-back period, or Group of Pictures (GOP) are used to achieve more efficient compression. The GOP might be 1, ,2 or 4 seconds long.

Client-side buffering is used to give a smoother streaming experience, even if there are small network issues. This means the user might be watching the stream a few seconds behind the real-time live point.

There are trade-offs between latency, smooth playbac,k and infrastructure demands. Reducing the segment duration increases calls to the CDN, impacting infrastructure needs.

Adaptive bitrate streaming is used to adjust the video quality in response to the user's network conditions.

The client-side player measures the download speed and chooses an appropriate video quality level, matching the user's network capacity.

If the network speed slows down, the client can switch to a lower-quality video (e.g., from 720p to 240p).

The server can also degrade the user's stream by limiting the number of available video quality options, for example during very high load. The server can also adjust the segment length in response to system load.

The client player is always starting playback a few seconds behind the live point, to avoid any interruption in playback if a segment is missed.

If a segment is missed on a TV, the TV will continue playing at the live point. However, on the internet, the client is using a buffer and will try to avoid missing a segment.

Monitoring, Metrics, and Scaling

Monitoring is based on leading and trailing indicators.

Leading indicators help to identify potential problems in realtime. Examples include buffer time and playback failure rates. These leading indicator metrics are given priority in the system.

Trailing indicators are used to perform a detailed analysis of issues after they occur.

Client-side metrics are collected and quickly processed by the server in less than a minute or sometimes within 30 seconds.

Server-side metrics, such as bandwidth, the number of requests, and latency, are also tracked.

The frequency of data collection is adjusted based on the system load. When there is higher traffic, the amount of data collected is sampled to manage the volume of data collected and processed.

Capacity planning is a very complex process involving infrastructure, network, and power, and is started at the end of the prior year, for the next year.

Capacity planning involves coordination with several infra providers to make sure they can scale their infrastructure for the events.

The planning focuses on metrics such as compute, RAM, disk, and network usage. The main metric that becomes the limiting factor is vCPUs.

Cloud resources are not infinite at the scale required for major live events. There is a finite amount of resources in a given location – at this scale of streaming, that is!

Providers need to purchase real estate, install links, and deploy servers.

Horizontal scaling is preferred for compute resources as it is easy to add boxes to the pool.

Databases and caches are scaled preemptively to avoid the need to scale them on the fly during events.

Auto-scaling is not effective for live events because it is too slow to respond to the rapid changes in traffic. Custom scaling systems are preferred.

The custom scaling system uses a concurrency metric, that is the number of users watching the stream, to scale services. All systems are scaled against a common concurrency metric.

The custom scaler also looks at user journeys, such as when users press the back button and return to the home page. This can cause a spike in traffic to the home page API.

APAC-specific live streaming challenges

Mobility is a significant challenge because most users in India watch live streams on mobile devices and are often on the move. This means that users are constantly switching between cell towers.

Battery consumption is also a key factor. Video streaming can quickly drain mobile phone batteries.

The video profile, polling frequency, and encoding algorithms are often chosen to reduce battery consumption.

“Game day simulation”: something Jio did to simulate peak load conditions.

Involved in generating synthetic traffic and the teams needed to scale systems and follow operational protocols in response.

The teams did not have access to the traffic dashboard, so the traffic patterns were unknown to the teams.

Advice for engineers to become better architects

Understand this: anything that can fail, will fail. Overconfidence in systems can lead to problems! Most people underestimate or overlook the potential failure modes.

Look at every aspect of your system including configurations and code as even the smallest things can cause problems.

Detailed metrics and measurements are vital. Both to see potential problems and to be able to debug effectively.

Ensure you are measuring metrics correctly. For example, response time should be measured from when the request is queued, not when it enters the processing function.

Do not rely too heavily on APMs. It is better to understand the low-level details and measure and fine-tune every aspect of your code.

To learn more about video encoding: look up documentation on GitHub and online. Look for resources going into how image compression is done, and how images are turned into video.

Most of the learning happens on the job. There isn't a lot of public information about problems at this kind of scale! Hopefully, this podcast was helpful in sharing more details!

Resources & Mentions

Where to find Ashutosh Agrawal:

• X: https://x.com/theprogrammerin

• LinkedIn: https://www.linkedin.com/in/theprogrammerin/

• Medium: https://medium.com/@theprogrammerin

Mentions during the episode:

• Disney+ Hotstar: https://www.hotstar.com/in

• What is a CDN: https://aws.amazon.com/what-is/cdn/

• Adaptive bitrate streaming: https://en.wikipedia.org/wiki/Adaptive_bitrate_streaming

• Skype: https://www.skype.com/en/

•Millions Scale Simulations: https://blog.hotstar.com/millons-scale-simulations-1602befe1ce5

• Black Friday: https://en.wikipedia.org/wiki/Black_Friday_(shopping)

• Asia-Pacific (APAC): https://en.wikipedia.org/wiki/Asia%E2%80%93Pacific

• Distributed architecture concepts I learned while building a large payments system: https://blog.pragmaticengineer.com/distributed-architecture-concepts-i-have-learned-while-building-payments-systems/

• Concurrency: https://web.mit.edu/6.005/www/fa14/classes/17-concurrency/

• Video streaming resources on Github: https://github.com/leandromoreira/digital_video_introduction

• Murphy’s Law: https://en.wikipedia.org/wiki/Murphy%27s_Law_(disambiguation)

• Java: https://www.java.com/

• Ruby: https://www.ruby-lang.org/en/

• Ruby on Rails: https://rubyonrails.org/

• Hacker News: https://news.ycombinator.com/

Production and marketing by Pen Name. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.


John Philpin : Lifestream

🕵💬 Inspired By People | 🌐 John Adams The Full Collectio

🕵💬 Inspired By People | 🌐 John Adams The Full Collection : Visual Scroll | 🔍 List Of Posts

🕵💬 Inspired By People | 🌐 John Adams

The Full Collection : Visual Scroll | 🔍 List Of Posts


Doc Searls Weblog

It’s still adtech

This morning Wired published This Ad-Tech Company Is Powering Surveillance of US Military Personnel. It’s a good piece, which is typical of Wired lately. But what caught my eye was “Ad-Tech” in the headline. Some writers say “ad tech.” Others say “adtech” or “AdTech.” I’m highly leveraged in “adtech,” since I’ve now posted 160 pieces (including […]

This morning Wired published This Ad-Tech Company Is Powering Surveillance of US Military Personnel. It’s a good piece, which is typical of Wired lately. But what caught my eye was “Ad-Tech” in the headline. Some writers say “ad tech.” Others say “adtech” or “AdTech.”

I’m highly leveraged in “adtech,” since I’ve now posted 160 pieces (including this one) using that expression since 2008.

So I did a Google Trends search on the three uses, and saw that “adtech” still wins, by a hair, though “ad tech” is close, and was ahead for much of the ‘teens.

The more interesting thing is that interest in the topic itself dropped by 75% between 2004 and th e mid-teens, and has kinda flattened since then.

But it’s still an issue.

At least I am relieved of the need to go back and change all those posts.


Don’t Buy This

Every so often a product shows up that is so bad somebody needs to sound a warning. So I’m sounding one for the Ion Retro Glow. For the last month or so, it’s been on display and selling at the Sams Club here in Bloomington, Indiana. That’s where I shot the photo above. At first I […]
Looks right, works wrong.

Every so often a product shows up that is so bad somebody needs to sound a warning.

So I’m sounding one for the Ion Retro Glow. For the last month or so, it’s been on display and selling at the Sams Club here in Bloomington, Indiana. That’s where I shot the photo above.

At first I thought it was just an interesting goof: an old-fashioned boom box with Bluetooth and a rechargeable battery. But then I remembered that I have about a hundred cassette tapes I want to go through, and no way to play them. I also thought the thing wouldn’t be a bad Bluetooth speaker system for my phone. The sound, while not great, wasn’t bad when I pressed the buttons on the display. I also still listen to some radio, so I thought that might be a nice bonus, if the radio was at least okay. And the price was right: $69.

So I bought one.

OMG. Quelle merde.

First, all the buttons and knobs are crap plastic, and the Stop/Eject button wouldn’t open the cassette door, making that function useless. Right there I needed to take it back. But to exchange it?

Not after checking out the radio.

The dial knob was so stiff I thought something was surely wrong with it. And there was. The dial pointer leaned one way or the other as one tuned up and down. And the radio was so bad on both bands that it would be a total turn-off to anyone wanting to give radio a try for the first time. (And there are now large demographics in that category.) Noise rejection on AM was completely absent, and the radio only got one station. There wasn’t even a tiny hint that there might be other signals out there. (And there are many here.) On FM, strong local signals splattered all over the dial, and the tuner made strange pulsing sounds as I (with lots of torque) turned the dial pointer slowly (there was no other way) up and down. And the sound kinda sucked too.

The only thing that worked as advertised was the Bluetooth. My phone found the thing instantly.

As for the sound, I’m much better served by the Bluetooth speakers I already have. There are good ones in the same price range.

The glowing rings around the speakers are just eye candy.

I suppose the rechargeable battery is okay. It worked for the few minutes I bothered checking it out.

The lesson: If you want a good boom box, check out your neighborhood or online thrift stores. Here’s Facebook Marketplace for my region here.

I suspect at least one of these is still good.

A final word to Sam’s Club: please stop selling this piece of crap. It makes victims of your customers.


Jon Udell

Web Components

The JavaScript industrial complex won’t crumble anytime soon. But the stage is set for a return to an ecosystem of reusable components accessible to business developers, only this time based on the universal web platform and its core standards. How To Build Web Components Using ChatGPT LLM series at The New Stack

The JavaScript industrial complex won’t crumble anytime soon. But the stage is set for a return to an ecosystem of reusable components accessible to business developers, only this time based on the universal web platform and its core standards.

How To Build Web Components Using ChatGPT

LLM series at The New Stack

Tuesday, 11. February 2025

Ben Werdmüller

The Social Web Foundation announces its membership in the World Wide Web Consortium

[Social Web Foundation] The Social Web Foundation has joined the W3C: "SWF joins CDT as one of the few civil society organizations that comprise the Consortium. SWF’s membership in the W3C underscores our commitment to promoting an open and federated social web, and our alignment with the W3C mission to develop web standards through community consensus that ensures the long-

[Social Web Foundation]

The Social Web Foundation has joined the W3C:

"SWF joins CDT as one of the few civil society organizations that comprise the Consortium. SWF’s membership in the W3C underscores our commitment to promoting an open and federated social web, and our alignment with the W3C mission to develop web standards through community consensus that ensures the long-term growth and accessibility of technical specifications that are openly licensed."

More forward motion for the open social web as a core part of the open web itself. This is also very good news:

"In terms of concrete ongoing work, we look forward to bringing end-to-end encryption to direct messages in ActivityPub, developing groups on the social web, supporting data portability with ActivityPub, making discovery of ActivityPub objects and their authors easier."

These will all make the open social web safer, more flexible, and easier to build on for new platform entrants. Let's go.

#Fediverse

[Link]


Simon Willison

llm-sort

llm-sort Delightful LLM plugin by Evangelos Lamprou which adds the ability to perform "semantic search" - allowing you to sort the contents of a file based on using a prompt against an LLM to determine sort order. Best illustrated by these examples from the README: llm sort --query "Which names is more suitable for a pet monkey?" names.txt cat titles.txt | llm sort --query "Which book should

llm-sort

Delightful LLM plugin by Evangelos Lamprou which adds the ability to perform "semantic search" - allowing you to sort the contents of a file based on using a prompt against an LLM to determine sort order.

Best illustrated by these examples from the README:

llm sort --query "Which names is more suitable for a pet monkey?" names.txt cat titles.txt | llm sort --query "Which book should I read to cook better?"

It works using this pairwise prompt, which is executed multiple times using Python's sorted(documents, key=functools.cmp_to_key(compare_callback)) mechanism:

Given the query: {query} Compare the following two lines: Line A: {docA} Line B: {docB} Which line is more relevant to the query? Please answer with "Line A" or "Line B".

From the lobste.rs comments, Cole Kurashige:

I'm not saying I'm prescient, but in The Before Times I did something similar with Mechanical Turk

This made me realize that so many of the patterns we were using against Mechanical Turk a decade+ ago can provide hints about potential ways to apply LLMs.

Via lobste.rs

Tags: llm, plugins, generative-ai, ai, llms, python, mechanical-turk


Ben Werdmüller

Tumblr to join the fediverse after WordPress migration completes

[Sarah Perez at TechCrunch] This was a very nice surprise to see: "Automattic confirmed to TechCrunch that when the migration is complete, every Tumblr user will be able to federate their blog via ActivityPub, just as every WordPress.com user can today." ActivityPub is the open protocol behind Mastodon and Pixelfed, among others. Threads and Ghost have also been steadily a

[Sarah Perez at TechCrunch]

This was a very nice surprise to see:

"Automattic confirmed to TechCrunch that when the migration is complete, every Tumblr user will be able to federate their blog via ActivityPub, just as every WordPress.com user can today."

ActivityPub is the open protocol behind Mastodon and Pixelfed, among others. Threads and Ghost have also been steadily adding support.

Given the long tail of ActivityPub and the simultaneous rise of Bluesky, which is connected to the ActivityPub network via Bridgy Fed, the future of the open social web is very bright. It is the future of all social media. This is another great milestone along the road.

#Fediverse

[Link]


Phil Windleys Technometria

The Business Case for Dynamic Authorization

Authorization isn't just about security.

Access management is seen by many business leaders as primarily a means of protecting and securing computer systems. Important, but of secondary importance to the business. But as computer systems come to intermediate almost every interaction the business has with employees, contractors, partners, and customers, dynamic authorization should be seen as a strategic business enabler. Investing in a robust, flexible, and pervasive authorization infrastructure can drive revenue growth, operational efficiency, regulatory compliance, and competitive differentiation.

Reducing Operational Costs

Manually managing access using rigid, static authorization models like ACLs and groups is labor-intensive and prone to errors. Organizations that rely on static methods often have employees who are dedicated to managing permissions for employees and others. These employees also perform manual audits, track down problems, and manage groups. As the organization grows, these processes become more complex—scaling superlinearly due to interactions in the system.

Dynamic authorization automates many of these access control decisions, reducing the need for manual intervention. This has several benefits:

Lower administrative overhead—eliminating the need for manually managing permissions and groups reduces administrative costs.

Reduced risk of over-permissioning—accounts with permissions they no longer need are the source of many costly security breaches.

Reduced security insurance premiums—many organizations buy costly insurance for security breaches and ransomware. Better authorization practices and systems can reduce premiums.

Fewer support tickets for access problems—tickets that require IT to drop what they’re doing to sort out a permissioning problem take these critical employees away from work that advances the organization’s products and services.

Improved onboarding and offboarding efficiency—dynamic authorization can ensure new employees or contractors have all the access they need on day one and lose it as soon as they leave.

Improved operational efficiency gives the organization the freedom to explore and grow instead of constantly battling access management problems.

Enabling Business Agility and Innovation

As more and more business is conducted online, organizations are finding that it’s vital to quickly react to changing business needs. Whether an organization is launching a new product, expanding into new markets, reacting to new regulatory requirements, or enabling new partnerships, being able to flexibly adapt to emerging requirements and support innovation is table stakes for successful organizations.

As we’ve discussed, static authorization methods require manual changes to lists and groups to increase or decrease access to systems. For example, a financial services firm that is employing external auditors for compliance reviews must grant access for the duration of the engagement. A dynamic authorization system makes this as easy as a policy change. Even that might not be required if authorization policies have been written so as to anticipate this kind of need.

New products often require custom code to support authorization requirements for customers and administrators. A workforce management service provider launching a new employee onboarding product must ensure that customers can properly authorize varying access levels for their employees to administer and manage the service securely. A dynamic authorization system can be integrated with the new product, allowing developers to build in the right authorization controls without writing custom authorization code.

Improving Customer Experience

The compelling features of modern SaaS applications, marketplaces, and collaborative services depend on carefully controlling access. In these platforms, dynamic authorization isn’t just for security; it also enhances the user experience and provides enhanced revenue opportunities.

For example, platforms like Google Docs, Dropbox, and SmugMug all allow their customers to share content with specific people or groups. Dynamic authorization makes this functionality possible.

Or consider multi-tenant SaaS companies like Workday or Salesforce. Fine-grained authorization allows these companies to isolate customer data while simultaneously allowing granular access within each tenant that follows complex rules. These companies can’t build a single access management system because each tenant requires different access controls depending on their organization, regulatory environment, and internal access policies. Dynamic authorization lets them more easily meet customer needs.

Finally, many online businesses offer different features to different users depending on subscription levels. Dynamic authorization policies allow this to be done without custom code and give the business flexibility to add or modify subscription levels and features without changing the underlying code.

Strengthening Security and Compliance

Using dynamic authorization for improved security and regulatory compliance provides several business advantages. Industries like finance, healthcare, and government are heavily regulated. The regulations require organizations to enforce least privilege access, ensure auditability, and dynamically adjust access based on employee roles and changing risk conditions. Organizational benefits from using dynamic authorization include decreased compliance risk, better employee experience, fewer workarounds that introduce security problems, and reduced overall cost.

Competitive Differentiation

Using dynamic authorization inside products gives organizations a competitive edge by offering a more secure, flexible, and user-friendly product.

For example, a B2B SaaS company with a product built with fine-grained access control can better attract large enterprise customers who demand flexible, yet secure features. A financial services company that lets customers dynamically set transaction limits based on varying risk signals allows them to reduce fraud while maintaining a rich user experience. A collaboration tool that offers flexible, secure content sharing beats out competitors who use more rigid, static sharing models.

Organizations can more easily respond to competitor product changes when access management is as simple as a policy change. And dynamic authorization provides these benefits without developers having to write custom code.

A Business Necessity

The preceding sections offer multiple examples of how dynamic authorization goes well beyond enhanced IT security. Organizations that embrace dynamic authorization gain enhanced operational efficiency through automation, increased business agility to more easily pursue new opportunities, stronger security and compliance with less overhead, and better customer experiences that drive customer engagement and revenue.

In the era of multi-tenant, AI-enhanced, SaaS applications, dynamic authorization is essential for organizations to securely scale and effectively compete. Failing to adopt better access management technologies and mechanisms puts organizations at risk of losing their competitive advantage.

Photo Credit: Octopus busy approving things from DALL-E (public domain) Prompt: Draw a picture of an octopus wearing an officials hat with each arm holding stamps that say either "allow" or "deny". The octopus is stamping multiple sheets of paper on a desk.


Heres Tom with the Weather

Bitcoin Science

Bitcoin failed. J.P. Koning notes in The end of El Salvador’s bitcoin payments experiment: But here was a government that was going to champion the stuff, nullifying all of the headwinds against bitcoin in one stroke! The government meddling hypothesis would be put to test. The Salvadoran government used a combination of sticks and carrots to kick-start adoption. First, let's list the ca

Bitcoin failed. J.P. Koning notes in The end of El Salvador’s bitcoin payments experiment:

But here was a government that was going to champion the stuff, nullifying all of the headwinds against bitcoin in one stroke! The government meddling hypothesis would be put to test. The Salvadoran government used a combination of sticks and carrots to kick-start adoption. First, let's list the carrots. The capital gains tax on bitcoin was set to zero to remove the hassle of buying stuff with bitcoin. The government also built a bitcoin payments app, Chivo, for all El Salvadoreans to use. (Chivo also supports U.S. dollar payments.) Anyone who downloaded Chivo and transacted with bitcoin would receive a $30 bitcoin bonus—that's a lot of money in El Salvador. Gas stations offered $0.20 off of a gallon of gas for customers who paid with the app. People could also use Chivo to pay their taxes with bitcoin. The biggest carrot was zero-transaction fees. Any payment conducted with Chivo was free, as was converting bitcoins held in the Chivo app into U.S. dollars and withdrawing cash at Chivo ATMs. These Chivo ATMs were rolled out across El Salvador and in the U.S., too, to encourage the nascent U.S.-to-El Salvador bitcoin remittance route. Bitcoin ATMs are usually incredibly pricey to use, but in El Salvador the government would eat all the transaction fees. What a fantastic deal. As for the stick, Bukele introduced a forced-tender rule. Beginning in 2021, businesses were required to accept the orange coin or be punished. This was costly for them to comply with. They would have to update point of sale software, signage, train employees, and set up new processes for handling bitcoins post-sale. By all rights, this combination of sticks and carrots should have led to a flourishing of bitcoin payments. But it didn't.

Koning concludes:

The saddest thing about El Salvador's bitcoin experiment is that all sorts of time and resources have been wasted. El Salvador is not a rich country. The money spent on building and operating Chivo, compliance by businesses, bitcoin signage, and subsidies could have been better deployed on more important things like health and education. One hopes that other countries learn from this experience and avoid going down the same route that El Salvador did.

The Pragmatic Engineer

Is Big Tech becoming more cutthroat?

Is it the end of a golden age of Big Tech, when jobs at leading companies offered high-impact work, top compensation, and good work-life balance? More signs suggest harsh perf management is the norm

A few years ago, companies like Google, Microsoft and Facebook were known as places where – inside certain organizations – some engineers could earn large sums of money for doing comparatively little work, and wile away the work week waiting for their large new joiner equity to vest over four years. This chill approach is what the “rest” in rest-and-vest refers to, which was a popular phrase at the time for it. These places also had many teams where work was laid back, and it was possible to “coast” and get by doing relatively little.

In 2017, Business Insider interviewed several such folks and wrote:

“Business Insider talked to about a half a dozen people with direct knowledge of the rest-and-vest culture. Some were "fat cats" themselves. Some were hiring managers who tried to lure these folks back to the world of productivity. Many acknowledged that resting and vesting was a common, hush-hush practice at their own companies. Internally, these people are often referred to as "coasters."

Their lives counter the other reality for many in the tech world: long work hours and pressure for workers to pledge unrelenting devotion to their companies and jobs above all else.”

A culture of lenient performance management at the biggest tech businesses contributed to laidback work patterns; I talked with managers at the likes of Google and Microsoft at the time who were frustrated that the system made it hard to manage out folks who were visibly checked out, and were hard to motivate to do even the bare minimum work.

Fast forward to today, and there are signs that Big Tech employers are being tougher than ever in performance management, and any tolerance of “rest and vest” culture is history. This article covers:

Meta: first performance-based mass layoffs. Nearly 3,700 people have been dismissed as ‘low performers’; it’s the first time that another reason wasn’t given for layoffs by the social media giant.

Microsoft: performance-based firings are back. Employees terminated on the spot for performance reasons, without warning, and some don’t get severance.

Evolution of Microsoft’s performance management. The Windows maker has been brutal in performance management before: its old stack ranking system was unpopular for close to two decades.

Even without stack ranking, there’s still bucketing. Stack ranking fell out of favor years ago, but bucketing is still how performance reviews work.

Why now? The end of zero rates, a cooling job market, and more. Takeaways from recent mass layoffs.

Companies that always had high performance expectations. Some Big Tech businesses have always had strict performance standards. For example, within Amazon, Netflix, and NVIDIA, little will change.

Related to this article is our two-part deepdive into How performance calibrations are done at tech companies.

1. Meta: first performance-based mass layoffs

Meta did no mass layoffs for its first 18 years of its existence, until November 2022 when it let go 13% of staff. Back then, there were business reasons. I wrote at the time:

Meta’s revenue is simply not growing fast enough. In Meta’s Historic Growth Challenge, I suggested that just by allowing attrition to slightly reduce headcount expenses, Meta could catch up with profitability. However, what I did not account for was how attrition was likely too slow to wait for, and not fully within the company’s control. Layoffs, however, are.

The stock price pressure likely became too much. Meta’s stock price dipped under $100 for the first time on Thursday, 27 October, a week before layoffs. The stock dropped by 26% that day, which was the biggest one-day fall, after the company forecast weaker-than-expected revenue growth for Q4 2022. (...)

Zuck has summarized these layoffs:

“We’ve cut costs across our business, including scaling back budgets, reducing perks, and shrinking our real estate footprint. We’re restructuring teams to increase our efficiency. But these measures alone won’t bring our expenses in line with our revenue growth, so I’ve also made the hard decision to let people go.”

Six months later in early 2023, the company reduced headcount by another 11%, letting go 10,000 people The reasoning was that it had overhired during the pandemic years of 2020-2021, and was too bloated. The layoffs flattened the organization and boosted efficiency.

That was two years ago, and since then Meta has become more efficient: it generates more revenue ($164B per year) and profit ($62B) than ever before, and its value is at an all-time high of $1.8 trillion dollars.

It’s in this context that Meta announces its first-ever performance-based mass layoffs. Five percent of staff are expected to be let go, starting this week with around 3,700 people. An internal email from Mark Zuckerberg explains why, as reported by CNBC:

“I’ve decided to raise the bar on performance management and move out low performers faster. We typically manage out people who aren’t meeting expectations over the course of a year, but now we’re going to do more extensive performance-based cuts during this cycle, with the intention of back filling these roles in 2025.

We won’t manage out everyone who didn’t meet expectations for the last period if we’re optimistic about their future performance, and for those we do let go, we’ll provide generous severance in line with what we provided with previous cuts.”

This clarity that it’s “low performers” who are being laid off, is new. The large mass layoffs of 2022-23 were justified differently. Of course, low performers are at risk of being let go in most circumstances. However, in Meta’s previous layoffs, plenty of high-performers were also cut who worked in teams seen as bloated cost centers, or targeted for sharp headcount drops.

While these cuts are unfortunate, Meta at least is offering generous severance to those impacted: 16 weeks of pay and an additional two weeks for each year of service.

2. Microsoft: performance-based firings are back

Meta isn’t the only tech giant terminating employees based on performance concerns; Microsoft is doing the same — except on an individual basis. Also from Business Insider:

“Microsoft has started performance-based job cuts, according to termination letters viewed by Business Insider.

Microsoft is taking a stronger stance on performance management like its competitors, and managers at the company have spent the past few months evaluating employees all the way up to level 80, one of its highest levels.”

One of several termination letters was reported by Business Insider. It reads:

"The reason(s) for the termination of your employment include that your job performance has not met minimum performance standards and expectations for your position… You are relieved of all job duties effective immediately and your access to Microsoft systems, accounts, and buildings will be removed effective today. You are not to perform any further work on behalf of Microsoft."

Just to repeat, performance-related firing is commonplace, but what’s different here is how short and quick the process is. Previously, most of Big Tech followed a standard process for workers seen as in need of improvement:

Feedback from the manager, often at a biannual performance review

Performance improvement plan (PIP) which formalises why someone is not meeting performance expectations, and how to succeed with the plan

Dismissal upon failure to clear the PIP. Big Tech has been known for generous severance packages which exceed the legal minimum

But now, Microsoft seems to be skipping PIPs and also not offering severance in some cases. This is unusual, given how differently the tech giant had treated employees since Satya Nadella became CEO. It also feels unusually petty to cancel severance packages for those affected, especially as Microsoft is reporting record profits. Is it a message to low performers to expect nothing from the company?

Microsoft getting “cutthroat” in its performance-management is also out of character, as it was Nadella who introduced a more lenient performance management approach, back in 2014.

3. Evolution of Microsoft’s performance management

Between the 1990s and 2013, Microsoft used a stack ranking system for performance management, which wasn’t advertised to employees until the mid-2000s – although many knew about Microsoft’s “vitality curve” for ranking engineers and managers. Under this, workers high on the curve got outsized bonuses and pay rises, and those low down the curve; well, they got managed out.

In 2004, Mini Microsoft (an anonymous employee at the company, blogging in the public) wrote a post explaining how the then still-secretive stack ranking worked:

“Then along came a new lead. Her feedback [to me was], "You've got to increase your team visibility so that you can do better in the stack rank meeting."

The what-rank? She said it slower as if it would help me to divine what the heck she was talking about. Then she got up and gave me the stack rank lesson and I got to learn about how the team is divided into columns of high, medium, and low folks and then each column has a person by person relative ranking, all those positions negotiated by the leads putting their people up on the whiteboard and then arguing the merits of which report belongs above which other reports.

She said they set the context of their decisions by asking a question like, "Okay, if the team were on a sinking boat and we had to decide who we would put on the life-boats, who would it be?" Up to that point, my ass was next in line for the boat but still going down with the ship.”

From 2004 – mostly thanks to this blog post – stack ranking was no longer a secret, but it wasn’t until 2011 that then-CEO Stever Ballmer acknowledged its existence in an internal email, writing:

“Each rating at each level will now have set compensation tied to the rating.

These ratings will be based on the results you accomplished during the review period (assessed against your commitments), how you accomplished them, and your proven capability. Ratings will be a simple 1-5 system with relative performance being assessed across common peer groups.”

The buckets were pre-defined, supposedly as 20% (top performers), 20% (good performers), 40% (average), 13% (below average), and 7% (poor performers).

I worked at Microsoft starting in 2012, the year after the existence of the stack ranking system became public knowledge. Knowing the distribution made me hope for a grade of 1-2, which would have meant my manager saw me as the “top 40%” within the team. I ended up getting a “3” in 2013, which I was disappointed with, as I interpreted it as being in the bottom 20th to 60th percentile.

Later, I talked with a HR person, who told me that nobody at Microsoft was ever happy with their grades:

Those getting a “1” (the highest rating for the top 20%) think they deserve it. Many feel entitled to it, more than they’re happy to achieve it

Everyone on a 2 to a 5 is disappointed to different extents

Stever Ballmer’s departure spelt the end of the stack ranking system. Shortly after Ballmer announced his retirement in August 2013, the company announced the system was also being retired, effective immediately in November 2013. There are a few possible reasons why Stack Ranking went extinct:

1. Office politics ruled Microsoft. From the mid-2000s, it was increasingly clear that internal politics was more important than building products customers loved.

Microsoft was blindsided by the 2007 launch of the iPhone, and the launch of Android the next year. It took three more years to finally launch a competitive device – the Windows Phone in 2011. By then, iPhone and Android had captured the bulk of the smartphone market.

In 2011, Google software engineer and cartoonist Manu Cornet drew a cartoon about how he perceived Amazon, Google, Facebook, Microsoft, Apple, and Oracle. This was what how he represented the Xbox maker:

Source: Manu Cornet

This image went viral, even though Manu never intended it as a big joke in his comic strip, as he explains in The Man Behind the Tech Comics. The intended target of the joke was Oracle, but his image of Microsoft captured a widely perceived truth.

Back then, there was close to zero collaboration between divisions at Microsoft, which were thousands of employees in size; like Windows Office, Server, Xbox, and Skype. I experienced the lack of collaboration – to the point of hostility – first-hand. In late 2013, my team was building Skype for Web, which we positioned as a competitor to Google Hangouts. We had a problem, though: in order to start a video or voice call, users needed to download a plugin which contained the required video codecs. We noticed Google Hangouts did the same on Internet Explorer and Firefox, but not on Chrome because the plugin was bundled with the browser for a frictionless experience.

My team decided we had to offer the same frictionless experience on Microsoft’s latest browser, Edge, which was in development at the time. After weeks of back-and-forth, the team politely and firmly rejected bundling our plugin into the new Microsoft browser. The reason? Their KPI was to minimize the download size of the browser, and helping us would not help them reach that goal.

It was a maddening experience. Microsoft could not compete with the likes of Google due to internal dysfunction like this; with teams and individuals focused on their own targets at the expense of the greater good for the company and users.

2. Stack ranking pinpointed as the core of the problem. In 2012, Vanity Fair published Microsoft’s lost decade, which said:

“At the center of the cultural problems was a management system called “stack ranking.” Every current and former Microsoft employee I interviewed—every one—cited stack ranking as the most destructive process inside of Microsoft, something that drove out untold numbers of employees. (...)

The system—also referred to as “the performance model,” “the bell curve,” or just “the employee review”—has, with certain variations over the years, worked like this: every unit was forced to declare a certain percentage of employees as top performers, then good performers, then average, then below average, then poor.

In the end, the stack-ranking system crippled the ability to innovate at Microsoft, executives said. “I wanted to build a team of people who would work together and whose only focus would be on making great software,” said Bill Hill, the former manager. “But you can’t do that at Microsoft.”

3. Investor and board pressure. By 2013, Microsoft’s stock had been flat for about 12 years. It was clear that cultural change was needed to turn business performance around, and removing the hated stack ranking system was one of the easiest ways for the leadership team to show that change was afoot.

4. Ballmer’s exit. Several leaders including Head of HR Lisa Brummel were never in favor of stack ranking, as Business Insider reported at the time. With Ballmer gone, executives could push decisions that would’ve previously been vetoed, before a new CEO took the helm.

Satya Nadella replaced stack ranking with a more collaborative performance review system. As CEO, he recognized the cultural problems Microsoft had. In his 2017 book, Hit Refresh, he recalled the pre-2014 times:

"Innovation was being replaced by bureaucracy. Teamwork was being replaced by internal politics. We were falling behind."

A new performance review system attempted to address the problems, rating employees in three areas:

Individual impact

Contributing to others’ success

Leveraging the work of others

Microsoft also got rid of its vitality curve (the stack ranking system), starting from 2014. The changes resulted in a different performance review process, where individual impact carried less weight. In 2022, Microsoft even started to measure how many of its employees said they were “thriving”, which it defined as being “energized and empowered to do meaningful work.” Note that this was at the peak of the hottest job market in tech, when attrition spiked across the sector, and even Big Tech needed new ways to retain people.

Signs that performance management was changing again were visible in 2023, when last September, Microsoft quietly introduced a new field for managers called “impact designators.” They had to rate the impact of their reports and not disclose this to employees. The ratings determined bonuses and pay rises.

As a former engineering manager, what surprised me about this lowkey change was not that it happened, but rather that it raises the question of what Microsoft was doing before? “Impact designator” is another name for “multiplier”, used in most tech workplaces. Ahead of performance calibration meetings, managers often know this information and must fit the budget, or can sometimes exceed it. Multipliers are finalized in the calibration which helps for dividing bonus pots, equity refresh, and pay rise budgets.

So it was a surprise to learn Microsoft operated without managers setting or recommending multipliers for nine years, as part of the performance process.

4. Even without stack ranking, there’s still bucketing

The demise of divisive stack ranking was cheered; but in reality, all larger companies still operate ranking frameworks today. At most mid-sized-and-above companies, performance review processes have the explicit goal to identify and reward top performers, and to find low performers and figure out what to do next. We cover the dynamics of the process in a two-part deepdive. Performance calibrations at tech companies, including:

Read more


Ben Werdmüller

Releasing all my text under a Creative Commons license

From time to time, people ask me if they can use the content of my posts in another venue or another format. To make that possible, today I released all the text of all my posts under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. You’ll see that declaration on the footer of every page of my site. What does that mean? I’m releasing the text of each post, no

From time to time, people ask me if they can use the content of my posts in another venue or another format. To make that possible, today I released all the text of all my posts under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International license. You’ll see that declaration on the footer of every page of my site.

What does that mean?

I’m releasing the text of each post, not the images. That’s because I license most of the images myself and don’t have the legal right to re-license them. You can copy and redistribute the material in any medium or format. Want to take the text and put it in a course, or another website, or an app, or a comic book? Knock yourself out. You can adapt the material. If you want to translate it, illustrate it, build on it — go for it. You can’t use it for commercial purposes under this license. I’m very open to my content being used for commercial purposes, but we need to work out the terms together. You need to attribute the original work. That means identifying me as the original author, linking to the original post or page, and clearly indicating if changes were made. You’ve got to release your version under the same license. If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original. You can’t add restrictions that stop people from doing any of the above things that are permitted by the license.

Take a look at the full license text for the complete picture. In particular, note the following:

No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.

Lastly: it’s optional, but if you do use the content, I’d love to hear about it. You can always email me at ben@werd.io.


A Few Eggs of Advice in These Trying Times

[Oneofthelibrarians at LibrarianShipwreck] Some advice about how to survive this era from LibrarianShipwreck, one of my most favorite blogs on the planet: "So, uh, it’s pretty bad out there! You are probably trying to figure out what the hell to do about it. Here are some words of advice, from wisdom gained through a couple decades in the trenches. Hope it helps." Some of

[Oneofthelibrarians at LibrarianShipwreck]

Some advice about how to survive this era from LibrarianShipwreck, one of my most favorite blogs on the planet:

"So, uh, it’s pretty bad out there! You are probably trying to figure out what the hell to do about it. Here are some words of advice, from wisdom gained through a couple decades in the trenches. Hope it helps."

Some of these are things that I am very bad at, including prioritizing physical health / ability. I think there's also a lot to say in favor of this:

"The Western, and especially USAian, mythos of the singularly special hero is a load of hooey. Don’t fall into that trap. Even when we occasionally do have individuals who make an outsized difference, if you need the thoughts in this post you are almost certainly not positioned to be that person. And that’s ok!"

What these times need, in other words, is co-operation, mutual aid, community, and allyship. American culture, as the piece says, is oriented around rugged individualism; while we all have individual rights, including the right to self-identity, the right to safety, the right to freedom of speech and thought, and so on, it's community that will set us free.

Jerry Springer was a cultural grenade who in some ways paved the path to where we are, but he got one thing right: he signed off every day with the mantra, "take care of yourselves, and each other." That's the spirit.

#Democracy

[Link]

Monday, 10. February 2025

Ben Werdmüller

The NSA's "Big Delete"

[Judd Legum and Rebecca Crosby in Popular Information] The removal of banned terms on both internal and external government websites is going more stupidly than one might have expected: "One example included a job listing page for the Department of Homeland Security that removed language about maintaining an “inclusive environment.” The Post also found examples of words bein

[Judd Legum and Rebecca Crosby in Popular Information]

The removal of banned terms on both internal and external government websites is going more stupidly than one might have expected:

"One example included a job listing page for the Department of Homeland Security that removed language about maintaining an “inclusive environment.” The Post also found examples of words being removed that had nothing to do with DEI, such as a page on the Department of the Interior’s website that boasted of its museums' “diverse collections,” removing the word “diverse.”"

And:

"The memo acknowledges that the list includes many terms that are used by the NSA in contexts that have nothing to do with DEI. For example, the term "privilege" is used by the NSA in the context of "privilege escalation." In the intelligence world, privilege escalation refers to "techniques that adversaries use to gain higher-level permissions on a system or network.""

The whole enterprise is silly, of course, but this is an incredibly bad way to go about it. Words have meaning, and sometimes you need to use them. A global search and replace isn't a perfect way to revamp the whole apparatus of federal government.

#Democracy

[Link]


Doc Searls Weblog

On Regrets and Their Absence

Somebody just gave the 31st upvote to my answer to the Quora question “What do you regret as you get older?” So I thought it might be worth repeating. Here’s a short list: Not learning at least one other language. Not learning a musical instrument (or to sing) well enough to play in a group. […]

Somebody just gave the 31st upvote to my answer to the Quora questionWhat do you regret as you get older?” So I thought it might be worth repeating.

Here’s a short list:

Not learning at least one other language. Not learning a musical instrument (or to sing) well enough to play in a group. Not getting fit physically and staying that way. (Related: not working hard to succeed in at least one varsity sport—especially one requiring teamwork.) Not spending more time in other countries and cultures when I was young. Getting married too early and often. (Since you’re asking, twice before a great marriage now going on 27 years.)

For a full perspective on those, here’s a list of things I don’t regret:

Staying curious about everything, all my life. (“Learn as if you’ll live forever, live as if you’ll die tomorrow,” Gandhi is said to have said.) Learning to ski (in my 40s) and at learning to play soccer and basketball well enough not to be chosen last in pickup games. Sucking in school, which forced me to learn in other ways—and to learn well enough to at least play a decent academic later in life. Never taking up smoking, drugs or drinking heavily. Watching so little TV that I miss most cultural references to various stars and shows.

There are many more possibilities for both lists, but that’s a start.

That was seven years ago. My wife and I have now been married for almost 34 years.


Ben Werdmüller

If MSN comments reveal the soul of America, we're done

For a while now, I’ve been syndicating my posts to MSN. You can see Werd I/O’s profile over there. In some ways, this is my normiest network: whereas my Mastodon community is more technical, my Bluesky community is more political and my newsletter subscribers tend to be a mix of people from the tech and media worlds alongside people I otherwise know, MSN encompasses Windows users who the algorit

For a while now, I’ve been syndicating my posts to MSN. You can see Werd I/O’s profile over there. In some ways, this is my normiest network: whereas my Mastodon community is more technical, my Bluesky community is more political and my newsletter subscribers tend to be a mix of people from the tech and media worlds alongside people I otherwise know, MSN encompasses Windows users who the algorithm thinks should be sent my stuff.

The comments have long fascinated me: they’re incredibly right-wing. I’d initially dismissed them as being part of some influence campaign on the network, but I now see them as an important barometer of a cross-section of what the American public thinks. It’s not good news.

For example, here’s a selection of comments on the MSN version of my link blog post for The 19th’s article about USAID’s lifesaving reproductive healthcare. There’s a lot of this kind of thing:

“Women need to be responsible for their own behaviors. If they become pregnant then they need to seek and pay for their care to ensure the baby is born healthy. Just another waste of taxpayer money.”

And:

“It takes two to tango, where are all these dead beat dads? Why is the American taxpayer responsible for the entire planet? Have any of you women ever heard the word no? Not in your language? Then cross your legs. MSN doesn't like the truth. Communist sensors.”

And, bafflingly:

“How do contraceptives prevent STDs and HIV? They don’t.”

And the absolutely nihilistic but also inherently counterproductive:

“worlds overpopulated as it is.”

As well as the top-rated comment at the time of writing:

“USAID has only used a small portion of the funds for humanitarian purposes. The vast majority has been used for crazy liberal agendas that have nothing to do with humanitarian purposes. Corrupt Democrats have been caught red handed that's why they are trying to cover up what the taxpayers' funds have really been used for.”

My fear is that this is America. These comments are ill-informed, occasionally wildly racist, and light years away from the debate I’d expect to have in other forums. It’s easy to dismiss most of these people as being idiots (something I can’t easily avoid). There are almost no tolerant or left-wing voices in the mix; instead, we’re left with the kind of rhetoric you might otherwise expect to see in communities that have dismissed Fox News as being too soft.

If I’m right, which I’d prefer not to be, it doesn’t say great things about our prospects over the next four years, or for the future of the country. If this is where normie discourse is at, it’s going to be rough.

Anyway, I’ll leave you with two more comments, from other posts:

“Thank you President Trump for putting America and Americans first. When the far left crooks scream loud we know we are on target. FEAR !”

And:

“what maga when both parties just care more about a foreign country while democrats just engage in h ate speech toward the majority and republicans dont care and wont call them ra cists as they are being called that for everything.”

Oof.


Judith Butler, philosopher: ‘If you sacrifice a minority like trans people, you are operating within a fascist logic’

[Iker Seisdedos interviewing Judith Butler in EL PAÍS English] Judith Butler is as on-point as ever: "Q. It wasn’t just Trumpism. Some Democratic voices say it’s time to move beyond the issue of trans rights in areas like sports, which affect very few people. A. You could say that about the Jews, Black people or Haitians, or any very vulnerable minority. Once you decide tha

[Iker Seisdedos interviewing Judith Butler in EL PAÍS English]

Judith Butler is as on-point as ever:

"Q. It wasn’t just Trumpism. Some Democratic voices say it’s time to move beyond the issue of trans rights in areas like sports, which affect very few people.

A. You could say that about the Jews, Black people or Haitians, or any very vulnerable minority. Once you decide that a single vulnerable minority can be sacrificed, you’re operating within a fascist logic, because that means there might be a second one you’re willing to sacrifice, and a third, a fourth, and then what happens?"

This is exactly it. I've also heard voices say that there should have been less discussion of racial equity: less Black Lives Matter, less 1619 Project, less discussion of systemic inequality. It's nonsense, and as Butler says, it's a road that leads us down an inevitably fascist path.

The whole interview is very much worth your time: nuanced and well-considered.

#Democracy

[Link]


@_Nat Zone

2月26日 PwC Digital Identity Forum 2025に出演します〜「オープンファイナンスの未来とデジタルアイデンティティの重要性」

2月26日 PwC Digital Identity Forum 2025に出演します。 開催日時 2025年2月26日(水)15:00~19:00(受付開始14:45) 申し込み締め切り 2025年2月25日(火)12:00 場所 東京国際フォーラム ホールB5(東京…

2月26日 PwC Digital Identity Forum 2025に出演します。

開催日時2025年2月26日(水)15:00~19:00(受付開始14:45)申し込み締め切り2025年2月25日(火)12:00場所東京国際フォーラム ホールB5
(東京都千代田区丸の内3丁目5番1号Bブロック5階)

私の出番はセッション1 (15:15 – 15:55) です。

Session1:オープンファイナンスの未来とデジタルアイデンティティの重要性

多くの企業が金融サービスに関わるようになってきた昨今、日本におけるフィンテックが持つ変革力と、金融取引をより信頼できるものにするためにデジタルアイデンティティが果たす重要な役割を探ります。グローバルの事例を参考にしながら、セキュリティとオープン性が複雑に絡み合うフィンテックの世界をどのように実現できるかについての理解を再定義します。

スピーカー

私以外の方々が錚々たるもので、私はいなくても良いのではないか疑惑もありますが、ぜひお越しください。

ちなみにこの後のセッションはデジタル庁の林さん (@lef) とNTTドコモの森山さん、それにPwCの柴田さんです。

16:10-16:50 Session2:ビジネス戦略で重要性を増す本人確認――企業を支えるデジタル社会の新基準

デジタル社会の進化に伴い、なりすましなどの不正利用防止や未成年保護のための年齢確認など、あらゆる企業にとって本人確認の役割はますます大きくなっています。
本セッションでは、普及が進むマイナンバーカードやパスキーといった最新の本人確認の仕組みとその応用について、業界の第一線で活躍する専門家が多角的に解説します。
企業活動における本人確認の価値やその実践的な活用方法を、具体的な事例と最新の動向を交えて探ります。

スピーカー

申し込みやその他のプログラムは、公式サイトよりご覧になっていただけます。

それでは現地でお目にかかりましょう。


Damien Bod

ASP.NET Core delegated OAuth Token Exchange access token management

This blog shows how to implement a delegated OAuth 2.0 Token Exchange RFC 8693 flow in ASP.NET Core, and has a focus on access token management. It looks at how the OAuth Token Exchange can be implemented and how an application can request delegated access tokens on behalf of a user and another application, providing […]

This blog shows how to implement a delegated OAuth 2.0 Token Exchange RFC 8693 flow in ASP.NET Core, and has a focus on access token management. It looks at how the OAuth Token Exchange can be implemented and how an application can request delegated access tokens on behalf of a user and another application, providing a seamless and secure access to protected resources using a zero trust strategy.

Code: https://github.com/damienbod/token-mgmt-ui-delegated-token-exchange

Blogs in this series ASP.NET Core user delegated access token management ASP.NET Core user application access token management ASP.NET Core delegated OAuth 2.0 Token Exchange access token management Setup

The solution implements an ASP.NET Core web application which authenticates using Microsoft Entra ID. The web application uses an API protected with a Microsoft Entra ID access token. This API uses another downstream API protected with Duende IdentityServer. The API exchanges the Microsoft Entra ID access token for a new Duende IdentityServer access token using the OAuth 2.0 Token Exchange standard. Both APIs use a user delegated access token. The tokens are persisted on the trusted backend using the IDistributedCache implementation. This can be an in-memory cache or a persistent cache. When using this cache, it is important to automatically renew the access token, if it is missing or invalid.

What must an application manage?

An access token management solution must ensure that tokens are securely stored per user session for delegated downstream API user tokens and updated after each UI authentication or refresh. The solution should be robust to handle token expiration, function seamlessly after restarts, and support multi-instance deployments. The tokens must be persisted safely in multiple instance setups. Additionally, it must effectively manage scenarios involving invalid or missing access tokens.

Properties of token management in the solution setup: The access token is persisted per user session The token expires The token needs to be persisted somewhere safely (Safe and encrypted storage if not in-memory) The token must be replaced after each UI authentication (per user) The solution must work after restarts The solution must work for multiple instances when deployed to multi-instance deployments. The solution must handle invalid access tokens or missing access tokens The application must handle a user logout Client Implementation (Entra ID API)

An OAuth 2.0 Token Exchange token request is sent to the Duende IdentityServer using the ApiTokenCacheClient. The service persists the token in a cache per user. The cache is implemented using the IDistributedCache interface.

using IdentityModel.Client; using IdentityModel; using Microsoft.Extensions.Caching.Distributed; using Microsoft.Extensions.Options; using System.Text.Json; namespace WebApiEntraId.WebApiDuende; public class ApiTokenCacheClient { private readonly ILogger<ApiTokenCacheClient> _logger; private readonly IHttpClientFactory _httpClientFactory; private readonly IOptions<WebApiDuendeConfig> _webApiDuendeConfig; private static readonly object _lock = new(); private readonly IDistributedCache _cache; private const int cacheExpirationInDays = 1; private class AccessTokenItem { public string AccessToken { get; set; } = string.Empty; public DateTime ExpiresIn { get; set; } } public ApiTokenCacheClient( IOptions<WebApiDuendeConfig> webApiDuendeConfig, IHttpClientFactory httpClientFactory, ILoggerFactory loggerFactory, IDistributedCache cache) { _webApiDuendeConfig = webApiDuendeConfig; _httpClientFactory = httpClientFactory; _logger = loggerFactory.CreateLogger<ApiTokenCacheClient>(); _cache = cache; } public async Task<string> GetApiTokenOauthGrantTokenExchange( string clientId, string audience, string scope, string clientSecret, string aadAccessToken) { var accessToken = GetFromCache(clientId); if (accessToken != null) { if (accessToken.ExpiresIn > DateTime.UtcNow) { return accessToken.AccessToken; } } _logger.LogDebug("GetApiToken new from STS for {api_name}", clientId); // add var newAccessToken = await GetApiTokenOauthGrantTokenExchangeAad( clientId, audience, scope, clientSecret, aadAccessToken); AddToCache(clientId, newAccessToken); return newAccessToken.AccessToken; } private async Task<AccessTokenItem> GetApiTokenOauthGrantTokenExchangeAad(string clientId, string audience, string scope, string clientSecret, string entraIdAccessToken) { var tokenExchangeHttpClient = _httpClientFactory.CreateClient(); tokenExchangeHttpClient.BaseAddress = new Uri(_webApiDuendeConfig.Value.IdentityProviderUrl); var cache = new DiscoveryCache(_webApiDuendeConfig.Value.IdentityProviderUrl); var disco = await cache.GetAsync(); var tokenExchangeSuccessResponse = await tokenExchangeHttpClient .RequestTokenExchangeTokenAsync(new TokenExchangeTokenRequest { Address = disco.TokenEndpoint, ClientId = clientId, ClientSecret = clientSecret, Audience = audience, SubjectToken = entraIdAccessToken, SubjectTokenType = OidcConstants.TokenTypeIdentifiers.AccessToken, Scope = scope, Parameters = { { "exchange_style", "delegation" } } }); if (tokenExchangeSuccessResponse != null) { return new AccessTokenItem { ExpiresIn = DateTime.UtcNow.AddSeconds(tokenExchangeSuccessResponse.ExpiresIn), AccessToken = tokenExchangeSuccessResponse.AccessToken! }; } _logger.LogError("no success response from oauth token exchange access token request"); throw new ApplicationException("no success response from oauth token exchange access token request"); } private void AddToCache(string key, AccessTokenItem accessTokenItem) { var options = new DistributedCacheEntryOptions() .SetSlidingExpiration(TimeSpan.FromDays(cacheExpirationInDays)); lock (_lock) { _cache.SetString(key, JsonSerializer.Serialize(accessTokenItem), options); } } private AccessTokenItem? GetFromCache(string key) { var item = _cache.GetString(key); if (item != null) { return JsonSerializer.Deserialize<AccessTokenItem>(item); } return null; } }

The WebApiDuendeService class uses the token API service to request data from the downstream API.

using IdentityModel.Client; using Microsoft.Extensions.Options; using System.Text.Json; namespace WebApiEntraId.WebApiDuende; public class WebApiDuendeService { private readonly IOptions<WebApiDuendeConfig> _webApiDuendeConfig; private readonly IHttpClientFactory _clientFactory; private readonly ApiTokenCacheClient _apiTokenClient; public WebApiDuendeService( IOptions<WebApiDuendeConfig> webApiDuendeConfig, IHttpClientFactory clientFactory, ApiTokenCacheClient apiTokenClient) { _webApiDuendeConfig = webApiDuendeConfig; _clientFactory = clientFactory; _apiTokenClient = apiTokenClient; } public async Task<string> GetWebApiDuendeDataAsync(string entraIdAccessToken) { try { var client = _clientFactory.CreateClient(); client.BaseAddress = new Uri(_webApiDuendeConfig.Value.ApiBaseAddress); var accessToken = await _apiTokenClient.GetApiTokenOauthGrantTokenExchange ( _webApiDuendeConfig.Value.ClientId, _webApiDuendeConfig.Value.Audience, _webApiDuendeConfig.Value.ScopeForAccessToken, _webApiDuendeConfig.Value.ClientSecret, entraIdAccessToken ); client.SetBearerToken(accessToken); var response = await client.GetAsync("api/profiles/photo"); if (response.IsSuccessStatusCode) { var data = await response.Content.ReadAsStringAsync(); if (data != null) { return data; } return string.Empty; } throw new ApplicationException($"Status code: {response.StatusCode}, Error: {response.ReasonPhrase}"); } catch (Exception e) { throw new ApplicationException($"Exception {e}"); } } }

Duende IdentityServer implementation

Duende IdentityServer provides an IExtensionGrantValidator interface to implement the identity server support for OAuth 2.0 Token Exchange standard. This service must validate the access token and provide the data to issue a new Duende access token. Other validation checks are required like validating the sub claim which represents the user in the delegated access token. It is important to validate the access token fully. The new access tokens should only be issued for the same user. It is important to use a unique identifier from the access token to read data and issue new data for the user. An email is normally not a good solution for this as users can change their email in some IAM solutions.

public class TokenExchangeGrantValidator : IExtensionGrantValidator { private readonly ITokenValidator _validator; private readonly OauthTokenExchangeConfiguration _oauthTokenExchangeConfiguration; private readonly UserManager<ApplicationUser> _userManager; public TokenExchangeGrantValidator(ITokenValidator validator, IOptions<OauthTokenExchangeConfiguration> oauthTokenExchangeConfiguration, UserManager<ApplicationUser> userManager) { _validator = validator; _oauthTokenExchangeConfiguration = oauthTokenExchangeConfiguration.Value; _userManager = userManager; } public async Task ValidateAsync(ExtensionGrantValidationContext context) { // defaults context.Result = new GrantValidationResult(TokenRequestErrors.InvalidRequest); var customResponse = new Dictionary<string, object> { {OidcConstants.TokenResponse.IssuedTokenType, OidcConstants.TokenTypeIdentifiers.AccessToken} }; var subjectToken = context.Request.Raw.Get(OidcConstants.TokenRequest.SubjectToken); var subjectTokenType = context.Request.Raw.Get(OidcConstants.TokenRequest.SubjectTokenType); var oauthTokenExchangePayload = new OauthTokenExchangePayload { subject_token = subjectToken!, subject_token_type = subjectTokenType!, audience = context.Request.Raw.Get(OidcConstants.TokenRequest.Audience), grant_type = context.Request.Raw.Get(OidcConstants.TokenRequest.GrantType)!, scope = context.Request.Raw.Get(OidcConstants.TokenRequest.Scope), }; // mandatory parameters if (string.IsNullOrWhiteSpace(subjectToken)) { return; } if (!string.Equals(subjectTokenType, OidcConstants.TokenTypeIdentifiers.AccessToken)) { return; } var (Valid, Reason, Error) = ValidateOauthTokenExchangeRequestPayload .IsValid(oauthTokenExchangePayload, _oauthTokenExchangeConfiguration); if (!Valid) { return; // UnauthorizedValidationParametersFailed(oauthTokenExchangePayload, Reason, Error); } // get well known endpoints and validate access token sent in the assertion var configurationManager = new ConfigurationManager<OpenIdConnectConfiguration>( _oauthTokenExchangeConfiguration.AccessTokenMetadataAddress, new OpenIdConnectConfigurationRetriever()); var wellKnownEndpoints = await configurationManager.GetConfigurationAsync(); var accessTokenValidationResult = await ValidateOauthTokenExchangeRequestPayload.ValidateTokenAndSignature( subjectToken, _oauthTokenExchangeConfiguration, wellKnownEndpoints.SigningKeys); if (!accessTokenValidationResult.Valid) { return; // UnauthorizedValidationTokenAndSignatureFailed(oauthTokenExchangePayload, accessTokenValidationResult); } // get claims from Microsoft Entra ID token and re use in Duende IDP token var claimsIdentity = accessTokenValidationResult.ClaimsIdentity; if (claimsIdentity == null) { return; } var isDelegatedToken = ValidateOauthTokenExchangeRequestPayload .IsDelegatedAadAccessToken(claimsIdentity); if (!isDelegatedToken) { return; // UnauthorizedValidationRequireDelegatedTokenFailed(); } var name = ValidateOauthTokenExchangeRequestPayload.GetPreferredUserName(claimsIdentity); var isNameAndEmail = ValidateOauthTokenExchangeRequestPayload.IsEmailValid(name); if (!isNameAndEmail) { return; // UnauthorizedValidationPreferredUserNameFailed(); } // Should use the OID var user = await _userManager.FindByNameAsync(name); if (user == null) { return; // UnauthorizedValidationNoUserExistsFailed(); } var sub = claimsIdentity.Claims!.First(c => c.Type == JwtClaimTypes.Subject).Value; var style = context.Request.Raw.Get("exchange_style"); if (style == "impersonation") { // set token client_id to original id context.Request.ClientId = oauthTokenExchangePayload.audience!; context.Result = new GrantValidationResult( subject: sub, authenticationMethod: GrantType, customResponse: customResponse); } else if (style == "delegation") { // set token client_id to original id context.Request.ClientId = oauthTokenExchangePayload.audience!; var actor = new { client_id = context.Request.Client.ClientId }; var actClaim = new Claim(JwtClaimTypes.Actor, JsonSerializer.Serialize(actor), IdentityServerConstants.ClaimValueTypes.Json); context.Result = new GrantValidationResult( subject: sub, authenticationMethod: GrantType, claims: [actClaim], customResponse: customResponse); } else if (style == "custom") { context.Result = new GrantValidationResult( subject: sub, authenticationMethod: GrantType, customResponse: customResponse); } } public string GrantType => OidcConstants.GrantTypes.TokenExchange; }

In Duende a client is required to support the OAuth 2.0 Token Exchange. This is added using the AllowedGrantTypes property. A secret is also required to acquire a new access token.

new Client { ClientId = "tokenexchangeclientid", ClientSecrets = { new Secret("--in-user-secrets--".Sha256()) }, AllowedGrantTypes = { OidcConstants.GrantTypes.TokenExchange }, AllowedScopes = { "shopclientscope" } }

Support for the OAuth Token Exchange is added to the Duende IdentityServer setup using the AddExtensionGrantValidator extension method.

var idsvrBuilder = builder.Services .AddIdentityServer(options => { options.Events.RaiseErrorEvents = true; options.Events.RaiseInformationEvents = true; options.Events.RaiseFailureEvents = true; options.Events.RaiseSuccessEvents = true; // see https://docs.duendesoftware.com/identityserver/v6/fundamentals/resources/ options.EmitStaticAudienceClaim = true; }) .AddInMemoryIdentityResources(Config.IdentityResources) .AddInMemoryApiScopes(Config.ApiScopes) .AddInMemoryClients(Config.Clients()) .AddAspNetIdentity<ApplicationUser>(); // registers extension grant validator for the token exchange grant type idsvrBuilder.AddExtensionGrantValidator<TokenExchangeGrantValidator>();

Running the solutions

When all four applications are started, the data from the Duende protected API is returned to the Razor Page application which uses Microsoft Entra ID to authenticate.

Links
Implement the OAUTH 2.0 Token Exchange delegated flow between an Microsoft Entra ID API and an API protected using OpenIddict

https://github.com/damienbod/OAuthGrantExchangeOidcDownstreamApi

https://docs.duendesoftware.com/identityserver/v7/tokens/extension_grants/token_exchange/

JSON Web Token (JWT)

Best Current Practice for OAuth 2.0 Security

The OAuth 2.0 Authorization Framework

OAuth 2.0 Demonstrating Proof of Possession DPoP

OAuth 2.0 JWT-Secured Authorization Request (JAR) RFC 9101

OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens

OpenID Connect 1.0

Microsoft identity platform and OAuth 2.0 On-Behalf-Of flow

OAuth 2.0 Token Exchange

JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens

HTTP Semantics RFC 9110

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/additional-claims

https://github.com/dotnet/aspnetcore/issues/8175


Simon Willison

Cerebras brings instant inference to Mistral Le Chat

Cerebras brings instant inference to Mistral Le Chat Mistral announced a major upgrade to their Le Chat web UI (their version of ChatGPT) a few days ago, and one of the signature features was performance. It turns out that performance boost comes from hosting their model on Cerebras: We are excited to bring our technology to Mistral – specifically the flagship 123B parameter Mistral Large 2

Cerebras brings instant inference to Mistral Le Chat

Mistral announced a major upgrade to their Le Chat web UI (their version of ChatGPT) a few days ago, and one of the signature features was performance.

It turns out that performance boost comes from hosting their model on Cerebras:

We are excited to bring our technology to Mistral – specifically the flagship 123B parameter Mistral Large 2 model. Using our Wafer Scale Engine technology, we achieve over 1,100 tokens per second on text queries.

Given Cerebras's so far unrivaled inference performance I'm surprised that no other AI lab has formed a partnership like this already.

Tags: mistral, generative-ai, cerebras, ai, llms

Sunday, 09. February 2025

Doc Searls Weblog

Fire and Rain

Twenty-fifth in the News Commons series Southern California has two seasons: Fire and Rain. Rain didn’t begin this year until a few days after Fire ended apocalyptically, incinerating much of Altadena and Pacific Palisades. Now Rain is here, with the occasional atmospheric river flowing across the faces of hills and mountains whose beards were just […]

Twenty-fifth in the News Commons series

This is etched in limestone over an entrance to a building at the University of Wyoming. It gave John McPhee the title for perhaps its most useful book.

Southern California has two seasons: Fire and Rain.

Rain didn’t begin this year until a few days after Fire ended apocalyptically, incinerating much of Altadena and Pacific Palisades. Now Rain is here, with the occasional atmospheric river flowing across the faces of hills and mountains whose beards were just burned off.

Much is being  written about what geologists call debris flows and Muggles call mudslides. These tend to happen when mountains of poorly bound slopes of loose rock and soil get drenched in rain after the vegetation holding everything in place has been burned away. Many of the big slopes above Los Angeles are mile-wide dump trucks waiting to hoist their beds and open their tailgates. The Los Angeles County Flood Control District (aka “Flood”) has been on this case for a century and stands ready with debris basins and other risk abatements. But the San Gabriel Mountains are much bigger, and resemble volcanoes in their tectonic youth and tendency to erode downward and outward almost as fast as earthquakes push them up.

For describing all this, no writing is more useful than John McPhee‘s Los Angeles Against The Mountains, which ran first as a pair of long essays in September and October 1988 editions of The New Yorker, and later as a chapter in The Control of Nature, which came out in 1990. (Another chapter in that book is “The Army Corps of Engineers vs. the Mississippi,” which first appeared as Achafalya in a 1987 issue of The New Yorker. The magazine published it again after Hurricane Katrina as if it were a live report on what happened when the levees failed in New Orleans—though it had been written, prophetically, seventeen years earlier.)

McPhee is the Beethoven, the Rembrandt, the Shakespeare of nonfiction: inimitable and without equal. At ninety-three he is still writing and teaching other writers at Princeton. Though I’ve never set foot in Princeton, McPhee has been teaching me how to write for many decades.  I have read all his books, some many times. A few have so many page flags I could brush off a table with them. Some of those flags now aid my compression of  “Los Angeles Against the Mountains.”

Here he frames the battle:

…in the confrontation of the urban and the wild. Los Angeles is overmatched on one side by the Pacific Ocean and on the other by very high mountains. With respect to these principal boundaries, Los Angeles is done sprawling. The San Gabriels, in their state of tectonic youth, are rising as rapidly as any range on earth. Their loose inimical slopes flout the tolerance of the angle of repose. Rising straight up out of the megalopolis, they stand ten thousand feet above the nearby sea, and they are not kidding with this city. Shedding, spalling, self-destructing, they are disintegrating at a rate that is also among the fastest in the world…

The slopes average sixty-five to seventy per cent. In numerous places, they are vertical…The term “oversteepened” is often used to describe them. At the giddy extreme of oversteepening is the angle of maximum slope. Very large sections of the San Gabriels closely approach that angle. In such terrain, there is not much to hold the loose material except the plants that grow there…

And here he’s describing the experience of hanging with geologists on the steep face of one slope:

Evergreen oaks were fingering up the creases in the mountainsides, pointing toward the ridgeline forests of big-cone Douglas fir, of knobcone and Coulter pine. The forests had an odd sort of timberline. They went down to it rather than up. Down from the ridges the conifers descended through nine thousand, seven thousand, six thousand feet, stopping roughly at five. The forests abruptly ended—the country below being too dry in summer to sustain tall trees. On down the slopes and all the way to the canyons was a thicket of varied shrubs that changed in character as altitude fell but was everywhere dense enough to stop an army. On its lower levels, it was all green, white, and yellow with buckwheat, burroweed, lotus and sage, deerweed, bindweed, yerba santa… The thicket’s resistance to trespass, while everywhere formidable, stiffened considerably as it evolved upward…Whatever and wherever they were, these plants were prickly, thick, and dry, and a good deal tougher than tundra. Those evergreen oaks fingering up the creases in the mountains were known to the Spaniards as chaparros. Riders who worked in the related landscape wore leather overalls open at the back, and called them chaparajos. By extension, this all but impenetrable brush was known as chaparral.

The low stuff, at the buckwheat level, is often called soft chaparral. Up in the tough chamise, closer to the lofty timber, is high chaparral, which is also called hard chaparral. High or low—hard, soft, or mixed—all chaparral has in common an always developing, relentlessly intensifying, vital necessity to burst into flame. In a sense, chaparral consumes fire no less than fire consumes chaparral. Fire nourishes and rejuvenates the plants. There are seeds that fall into the soil, stay there indefinitely, and will not germinate except in the aftermath of fire. There are basal buds that sprout only after fire. Droughts are so long, rains so brief, that dead bits of wood and leaves scarcely decay. Instead, they accumulate, thicken, until the plant community is all but strangling in its own duff. The nutrients in the dead material are being withheld from the soil. When fire comes, it puts the nutrients back in the ground. It clears the terrain for fresh growth. When chaparral has not been burned for thirty years, about half the thicket will be dry dead stuff—twenty-five thousand tons of it in one square mile. The living plants are no less flammable. The chamise, the manzanita—in fact, most chaparral plants—are full of solvent extractives that burn intensely and ignite easily. Their leaves are glossy with oils and resins that seal in moisture during hot dry periods and serve the dual purpose of responding explosively to flame. In the long dry season, and particularly in the fall, air flows southwest toward Los Angeles from the Colorado Plateau and the Basin and Range. Extremely low in moisture, it comes out of the canyon lands and crosses the Mojave Desert. As it drops in altitude, it compresses, becoming even dryer and hotter. It advances in gusts. This is the wind that is sometimes called the foehn. The fire wind. The devil wind. In Los Angeles, it is known as Santa Ana. When chamise and other chaparral plants sense the presence of Santa Ana winds, their level of moisture drops, and they become even more flammable than they were before. The Santa Anas bring what has been described as “instant critical fire weather.” Temperatures rise above a hundred degrees. Humidity drops very close to zero. According to Charles Colver, of the United States Forest Service, “moisture evaporates off your eyeballs so fast you have to keep blinking.”

About fires, when they happen, he says this:

…Where the Santa Anas collide with local mountain winds, they become so erratic that they can scatter a fire in big flying brands for a long distance in any direction. The frequency and the intensity of the forest fires in the Southern California chaparral are the greatest in the United States, with the possible exception of the wildfires of the New Jersey Pine Barrens.

McPhee’s writing is always wrapped around characters, most of which I’m leaving out of this compression. The first exception for our purpose here is Wade Wells, a hydrologist with the United States Forest Service.

The chaparral fires are considerably more potent than the forest fires Wade Wells saw when he was an undergraduate at the University of Idaho or when he worked as a firefighter in the Pacific Northwest. “Fires in the Pacific Northwest are nothing compared with these chaparral fires,” he remarked. “Chaparral fires are almost vicious by comparison. They’re so intense. Chaparral is one of the most flammable vegetation complexes there are.”

It burns as if it were soaked with gasoline. Chaparral plants typically have multiple stems emerging from a single root crown, and this contributes not only to the density of the thickets but, ultimately, to the surface area of combustible material that stands prepared for flame. Hundreds of acres can be burned clean in minutes. In thick black smoke there is wild orange flame, rising through the canyons like explosion crowns. The canyons serve as chimneys, and in minutes whole mountains are aflame, resembling volcanoes, emitting high columns of fire and smoke…

In millennia before Los Angeles settled its plain, the chaparral burned every thirty years or so, as the chaparral does now. The burns of prehistory, in their natural mosaic, were smaller than the ones today. With cleared fire lanes, chemical retardants, and other means of suppressing what is not beyond control, people have conserved fuel in large acreages. When the inevitable fires come, they burn hotter, higher, faster than they ever did in a state of unhindered nature. When the fires end, there is nothing much left on the mountainsides but a thin blanket of ash. The burns are vast and bare. On the sheer declivities where the surface soils were held by chaparral, there is no chaparral.

Fine material tumbles downslope and collects in the waterless beds of streams. It forms large and bulky cones there, to some extent filling the canyons. Under green chaparral, the gravitational movement of bits of soil, particles of sand, and other loose debris goes on month after month, year after year, especially in oversteepened environments, where it can represent more than half of all erosion. After a burn, though, it increases exponentially. It may increase twentyfold, fortyfold, even sixtyfold. This steady tumbling descent of unconsolidated mountain crumbs is known as dry ravel. After a burn, so much dry ravel and other debris becomes piled up and ready to go that to live under one of those canyons is (as many have said) to look up the barrel of a gun.

One would imagine that the first rain would set the whole thing off, but it doesn’t. The early-winter rains—and sometimes the rains of a whole season—are not enough to make the great bulk move. Actually, they add to it…

In the slow progression of normal decay, chaparral litter seems to give up to the soil what have been vaguely described as “waxlike complexes of long-chain aliphatic hydrocarbons.” These waxy substances are what make unburned chaparral soil somewhat resistant to water, or “slightly nonwettable,” as Wells and his colleagues are wont to describe it. When the wildfires burn, and temperatures at the surface of the ground are six or seven hundred centigrade degrees, the soil is so effective as an insulator that the temperature one centimetre below the surface may not be hot enough to boil water. The heavy waxlike substances vaporize at the surface and recondense in the cooler temperatures below. Acting like oil, they coat soil particles and establish the hydrophobic layer—one to six centimetres down. Above that layer, where the waxlike substances are gone, the veneer of burned soil is “wettable.” When Wells drips water on a dishful of that, the water soaks in as if the dish were full of Kleenex. When rain falls on burned and denuded ground, it soaks the very thin upper layer but can penetrate no farther. Hiking boots strike hard enough to break through into the dust, but the rain is repelled and goes down the slope. Of all the assembling factors that eventually send debris flows rumbling down the canyons, none is more detonative than the waterproof soil.

In the first rains after a fire, water quickly saturates the thin permeable layer, and liquefied soil drips downhill like runs of excess paint. These miniature debris flows stripe the mountainsides with miniature streambeds—countless scarlike rills that are soon the predominant characteristic of the burned terrain. As more rain comes, each rill is going to deliver a little more debris to the accumulating load in the canyon below. But, more to the point, each rill—its natural levees framing its impermeable bed—will increase the speed of the surface water. As rain sheds off a mountainside like water off a tin roof, the rill network, as it is called, may actually cube the speed, and therefore the power, of the runoff. The transport capacity of the watershed—how much bulk it can move—may increase a thousandfold. The rill network is prepared to deliver water with enough force and volume to mobilize the deposits lying in the canyons below. With the appearance of the rills, almost all prerequisites have now sequentially occurred. The muzzle-loader is charged. For a full-scale flat-out debris flow to burst forth from the mountains, the final requirement is a special-intensity storm.

Some of the most concentrated rainfall in the history of the United States has occurred in the San Gabriel Mountains. The oddity of this is about as intense as the rain. Months—seasons—go by in Los Angeles without a fallen drop. Los Angeles is one of the least-rained-upon places in the Western Hemisphere. The mountains are so dry they hum. Erosion by dry ravel greatly exceeds erosion by water. The celebrated Mediterranean climate of Los Angeles owes itself to aridity. While Seattle is receiving its average rainfall of thirty-nine inches a year, Chicago thirty-three, the District of Columbia thirty-nine, and New York City forty-four, Los Angeles is doing well if it gets fifteen. In one year out of every four over the past century, rainfall in Los Angeles has been under ten inches, and once or twice it was around five. That is pure Gobi. When certain storm systems approach Los Angeles, though—storms that come in on a very long reach from far out in the Pacific—they will pick up huge quantities of water from the ocean and just pump it into the mountains…

Here begins a story about one debris flow, in a setting high and dry:

Five miles into the mountains from the edge of the city is a small, obscure, steep-sided watershed of twenty-five hundred acres which is drained by the Middle Fork of Mill Creek, a tributary of the Big Tujunga. The place is so still you can hear the dry ravel…

Then came Fire:

It was a textbook situation—a bowl in the mountains filled with hard chaparral that had not been touched by fire in ninety-nine years. The older chaparral becomes, the hotter it burns. In its first ten years of new growth, it is all but incombustible. After twenty years, its renewed flammability curves sharply upward. It burns, usually, before it is forty years old. The hotter the fire, the more likely a debris flow—and the greater the volume when it comes. The century-old fuel of the Middle Fork was so combustible that afterward there were not even stumps. The slopes looked sandpapered. The streambed, already loaded, piled even higher with dry ravel. The Middle Fire, as the burn was known, was cause for particular alarm, because a small settlement was a mile downstream. Its name—Hidden Springs—contained more prophecy than its residents seemed prepared to imagine. Three hundred and ninety thousand cubic yards of loose debris was gathered just above them, awaiting mobilization.

Then, Rain:

Toward midnight February 9th, an accidental fire broke out in a small building of Gabe Hinterberg’s. A fire truck eventually came. Half a dozen people fought the fire, assisted by the heavy rain. One of them was George Scribner. The five-minute spike of greatest downpour occurred at about one-thirty. Half an hour later, George said, “Hey, we got the fire put out.”

Gabe said, “Good deal.”

And then Gabe and George were dead.

Amos Lewis, nearby, was holding a fire hose in his hand and was attempting to prevent it from kinking. In his concentration, he did not see danger coming. He heard nothing ominous. He only felt the hose draw taut. Through his peripheral vision he became aware that the fire truck—with the hose connected to it—was somehow moving sideways. Seconds later, Amos Lewis, too, was swept away.

The snout of the debris flow was twenty feet high, tapering behind. Debris flows sometimes ooze along, and sometimes move as fast as the fastest river rapids. The huge dark snout was moving nearly five hundred feet a minute and the rest of the flow behind was coming twice as fast, making roll waves as it piled forward against itself—this great slug, as geologists would describe it, this discrete slug, this heaving violence of wet cement. Already included in the debris were propane tanks, outbuildings, picnic tables, canyon live oaks, alders, sycamores, cottonwoods, a Lincoln Continental, an Oldsmobile, and countless boulders five feet thick. All this was spread wide a couple of hundred feet, and as the debris flow went through Hidden Springs it tore out more trees, picked up house trailers and more cars and more boulders, and knocked Gabe Hinterberg’s lodge completely off its foundation. Mary and Cal Drake were standing in their living room when a wall came off. “We got outside somehow,” he said later. “I just got away. She was trying to follow me. Evidently, her feet slipped out from under her. She slid right down into the main channel.” The family next door were picked up and pushed against their own ceiling. Two were carried away. Whole houses were torn loose with people inside them. A house was ripped in half. A bridge was obliterated. A large part of town was carried a mile downstream and buried in the reservoir behind Big Tujunga Dam. Thirteen people were part of the debris. Most of the bodies were never found.

As Amos Lewis suddenly found himself struggling in the viscous flow, he more or less bumped into a whirling pickup, coming down in the debris from who knows where upstream. One of the roll waves picked him up and threw him into the back of the truck. As the vehicle spun around and around, it neared one bank. Lewis saw an overhanging limb. He reached for it, caught it, and pulled himself above the rocky flow. Years later, just about where this had happened, he told Wade Wells and me the story. “I got pushed to one side,” he said as he finished. “I lucked out.” Lewis is a prematurely white-haired man with a white beard and dark-brown eyes. On this day in late spring, his muscular build and deeply tanned skin were amply displayed by a general absence of clothing. He wore bluejean shorts, white socks, mountain boots, and nothing else. When people began to discover human remains in the reservoir, he had gone in his patrol car to investigate the fate of his neighbors. “I had to go roll on them calls,” he said. “A deputy sheriff has to roll on any type of body being found. I carried out at least four, maybe five, skulls.”

These are all things to bear in mind when we visit how news ought to work in a digital environment where facts mostly don’t matter—until they do.

 

 

 


Simon Willison

Quoting Sam Altman

The cost to use a given level of AI falls about 10x every 12 months, and lower prices lead to much more use. You can see this in the token cost from GPT-4 in early 2023 to GPT-4o in mid-2024, where the price per token dropped about 150x in that time period. Moore’s law changed the world at 2x every 18 months; this is unbelievably stronger. — Sam Altman, Three Observations Tags: generati

The cost to use a given level of AI falls about 10x every 12 months, and lower prices lead to much more use. You can see this in the token cost from GPT-4 in early 2023 to GPT-4o in mid-2024, where the price per token dropped about 150x in that time period. Moore’s law changed the world at 2x every 18 months; this is unbelievably stronger.

Sam Altman, Three Observations

Tags: generative-ai, openai, llm-pricing, ai, llms, sam-altman


Ben Werdmüller

USAID’s reproductive health spending has saved millions of lives. Now it’s gone.

[Jessica Kutz at The 19th] USAID's defunding will lead directly to women's deaths: "As of 2023, 67 percent of contraceptives supplied through USAID went to Africa, where some of the leading causes of death for girls and women are related to pregnancy and sexually transmitted infections like HIV. According to an analysis by the Guttmacher Institute, if no contraceptive care i

[Jessica Kutz at The 19th]

USAID's defunding will lead directly to women's deaths:

"As of 2023, 67 percent of contraceptives supplied through USAID went to Africa, where some of the leading causes of death for girls and women are related to pregnancy and sexually transmitted infections like HIV. According to an analysis by the Guttmacher Institute, if no contraceptive care is provided by USAID in 2025, that will lead to about 4.2 million unintended pregnancies and over 8,000 deaths related to pregnancy and childbirth complications."

The article goes on to detail efforts in countries like Afghanistan, Senegal, India, and Nigeria. The idea that we should simply rug-pull these efforts is ludicrous: it sends a clear message that we no longer care about the well-being of people overseas, and that we don't think their quality of life is important to us or affects us. This is an obvious, profound mistake.

#Democracy

[Link]


Donald Trump’s Immigration Executive Orders: Tracking the Most Impactful Changes

[Mica Rosenberg, Perla Trevizo, and Zisiga Mukulu in ProPublica, co-published with The Texas Tribune] This is a beautifully-designed co-production between ProPublica and The Texas Tribune, illustrating the immigration policies that Donald Trump enacted on day one. These encompassed dozens of policies that were revived from his first term, as well as seven new ones that hadn't

[Mica Rosenberg, Perla Trevizo, and Zisiga Mukulu in ProPublica, co-published with The Texas Tribune]

This is a beautifully-designed co-production between ProPublica and The Texas Tribune, illustrating the immigration policies that Donald Trump enacted on day one. These encompassed dozens of policies that were revived from his first term, as well as seven new ones that hadn't been tried before.

"In order to provide a glimpse of the enormity of the changes that are underway, ProPublica and the Tribune identified nearly three dozen of the most impactful policy changes set in motion by the orders signed on the first day. Most were pulled from the playbook of Trump’s previous presidency. Others are unprecedented."

The new ones are pretty stark, including:

"Ending and clawing back funding from organizations that support migrants: Seeks to stop or limit money to nongovernmental organizations that provide shelter and services to migrants released at the border, as well as legal orientation programs for people in immigration proceedings."

And, of course much has been written about the unconstitutionality of:

"Seeks to end birthright citizenship: Attempts to end birthright citizenship of children born to parents either illegally in the United States or under a temporary legal status, something Trump had only said he wanted to do in his first term."

It's useful to have these written in one place, in an easy-to-digest form, together with updates on what's happened since. The news can feel like a deluge, and aggregating the updates into something parseable is important.

#Democracy

[Link]

Saturday, 08. February 2025

Ben Werdmüller

Shattering the Overton Window

[Natalia Antelava in Coda Story] This is a useful framework for thinking about ongoing harm. "It was 2014, and I was standing in the ruins of Donetsk airport, when a Russian-backed rebel commander launched into what seemed like an oddly academic lecture. Between bursts of artillery fire, he explained an American political science concept: the Overton Window – a theory that d

[Natalia Antelava in Coda Story]

This is a useful framework for thinking about ongoing harm.

"It was 2014, and I was standing in the ruins of Donetsk airport, when a Russian-backed rebel commander launched into what seemed like an oddly academic lecture. Between bursts of artillery fire, he explained an American political science concept: the Overton Window – a theory that describes the range of policies and ideas a society considers acceptable at any given time. Politicians can’t successfully propose anything outside this “window” of acceptability without risking their careers. “The West uses this window,” he said, smoke from his cigarette blowing into my face, “to destroy our traditional values by telling us it’s okay for me to marry a man and for you to marry a woman. But we won’t let them.”"

And that's the real, lasting impact of Trump and his worldview:

"As transactional relationships replace values-based alliances, as oligarchic control displaces democratic institutions, as the unthinkable becomes routine – the transformation of our societies isn’t happening by accident."

What will undoing this take? How can we shift the Overton Window back towards inclusion, communities, and compassion? How can we get to the mutualistic, integrated society we need to reach, and say goodbye to this disgustingly retrograde conservatism for good?

#Democracy

[Link]


Simon Willison

Quoting Salvatore Sanfilippo

[...] We are destroying software with complex build systems. We are destroying software with an absurd chain of dependencies, making everything bloated and fragile. We are destroying software telling new programmers: “Don’t reinvent the wheel!”. But, reinventing the wheel is how you learn how things work, and is the first step to make new, different wheels. [...] — Salvatore Sanfilippo, We

[...] We are destroying software with complex build systems.

We are destroying software with an absurd chain of dependencies, making everything bloated and fragile.

We are destroying software telling new programmers: “Don’t reinvent the wheel!”. But, reinventing the wheel is how you learn how things work, and is the first step to make new, different wheels. [...]

Salvatore Sanfilippo, We are destroying software

Tags: salvatore-sanfilippo, programming, software-engineering


Wrench in the Gears

Proposal For A Spring Break From Mind Viruses – March 13 to the Summer Solstice: Ground, Gather Energy, Reflect, Renew 5 Years Later

I made a video today reflecting on how we manage (or don’t) our energy and how our engagement with digital information complicates our lives. I’m proposing that people consider dialing back their social media consumption to spend time reflecting on their thinking, what we have learned over the past five years, and how we can [...]

I made a video today reflecting on how we manage (or don’t) our energy and how our engagement with digital information complicates our lives. I’m proposing that people consider dialing back their social media consumption to spend time reflecting on their thinking, what we have learned over the past five years, and how we can navigate future challenges with integrity and grace. In the space that is created I am hoping some people will experience ontopoetic synchronicities, conversations with the divine, as we become more intentional about how we direct our consciousness and bodies in this 3D world. I would love to hear back from anyone who gives this a try to see what your experience has been. Life is a stage and we are players. Consider this an unplugged improv opportunity where you get to riff with the quantum.

Words of the day: biosemiotics, memetics, reality tunnel, and metacognition.

Take care with that biocomputer programming. : )

Friday, 07. February 2025

Ben Werdmüller

From COBOL to chaos: Elon Musk, DOGE, and the Evil Housekeeper Problem

[Dan Hon in MIT Technology Review] The always-brilliant Dan Hon on DOGE: "We’re seeing in real time that there are no practical technical measures preventing someone from taking a spanner to the technology that keeps our government stable, that keeps society running every day—despite the very real consequences. So we should plan for the worst, even if the likelihood of the

[Dan Hon in MIT Technology Review]

The always-brilliant Dan Hon on DOGE:

"We’re seeing in real time that there are no practical technical measures preventing someone from taking a spanner to the technology that keeps our government stable, that keeps society running every day—despite the very real consequences.

So we should plan for the worst, even if the likelihood of the worst is low."

The suggestions that follow - identifying risks, working together, standing up and saying "no" - are all sensible and needed.

#Democracy

[Link]


'Reboot' Revealed: Elon Musk's CEO-Dictator Playbook

[Gil Duran in The Nerd Reich] Curtis Yarvin's influence is felt again: " In an essay on his paywalled Substack, he imagined a second Trump presidency in which Trump would enable a radical government transformation. The proposal will sound familiar to anyone who has watched Musk wreak havoc on the United States Government (USG) over the past three weeks." As Duran points ou

[Gil Duran in The Nerd Reich]

Curtis Yarvin's influence is felt again:

" In an essay on his paywalled Substack, he imagined a second Trump presidency in which Trump would enable a radical government transformation. The proposal will sound familiar to anyone who has watched Musk wreak havoc on the United States Government (USG) over the past three weeks."

As Duran points out, none of what's happening right now is exactly new or a surprise:

"What surprises me most is how the political press generally fails to inform the public that Musk is taking a systematic approach, one that has been outlined in public forums for years. (Some press outlets, like the Washington Post and Los Angeles Times, are owned by billionaires keenly interested in kowtowing to Musk and Trump.)"

For many people, the myth of American exceptionalism may be so deeply in their bloodstream that they simply can't imagine our institutions falling to this. But of course they can: this is the country that gave us McCarthyism and Jim Crow. it's happening in plain sight.

#Democracy

[Link]


@_Nat Zone

個人情報保護委員会、「本人関与に係る規律の在り方」の部分について具体的な制度設計の方向性提示

2月5日の個人情報保護委員会において、1月22日資料で事務局ヒアリング結果を踏まえ特に新たに追加した部分の多い「本人関与に係る規律の在り方」の部分(同意規制の在り方、漏えい発生時の本人通知の在り方、子供の個人情報)について具体的な制度設計の方向性を示されました。 https://…

2月5日の個人情報保護委員会において、1月22日資料で事務局ヒアリング結果を踏まえ特に新たに追加した部分の多い「本人関与に係る規律の在り方」の部分(同意規制の在り方、漏えい発生時の本人通知の在り方、子供の個人情報)について具体的な制度設計の方向性を示されました。 https://www.ppc.go.jp/aboutus/minutes/2024/20250205/

これからちゃんと読みますが、例によってOtioに要約を作ってもらいましたのでシェアしておきます。

個人情報保護法の制度的課題に関する考え方(案)の詳細な要約 1. 個人データの取扱いにおける本人関与の規律 本人の同意が不要となる場合について再検討 統計情報作成のためのデータ共有が増加の傾向 特定個人を排除した統計情報の利用は権利侵害のリスクが低いとの認識 行政機関が統計作成に関する場合、例外規定の拡大を提案 2. 本人の意思に反しない取扱い 同意が不要となる条件を明確化 契約履行に必要な場合 プライバシーや権利利益を害さない場合 条件や具体的な範囲を設定する際にステークホルダーの意見を反映 3. 生命保護や公衆衛生のための同意取得 同意取得が難しいケースへの考慮 本人の同意を得ることが困難な状況のほか、「相当の理由」がある場合も例外適用を可能にする提案 プライバシー保護措置が実現されることを前提条件とする 4. 子供の個人情報取扱いに関する規律 子供に適用される年齢基準を明確化 16歳未満を対象とし、特別な保護を設定すべきとの提案 法定代理人からの同意取得を原則としつつ、例外的に本人の同意を認める場合も考慮 未成年者の最善の利益を考慮した取り扱い 事業者に対して責務規定を設置する提案 行政機関にも同様に責務を設ける改正の必要性


Simon Willison

Quoting Jared Palmer

Confession: we've been hiding parts of v0's responses from users since September. Since the launch of DeepSeek's web experience and its positive reception, we realize now that was a mistake. From now on, we're also showing v0's full output in every response. This is a much better UX because it feels faster and it teaches end users how to prompt more effectively. — Jared Palmer, VP of AI at Ver

Confession: we've been hiding parts of v0's responses from users since September. Since the launch of DeepSeek's web experience and its positive reception, we realize now that was a mistake. From now on, we're also showing v0's full output in every response. This is a much better UX because it feels faster and it teaches end users how to prompt more effectively.

Jared Palmer, VP of AI at Vercel

Tags: ux, prompt-engineering, vercel, deepseek, generative-ai, ai, llms


Using pip to install a Large Language Model that's under 100MB

I just released llm-smollm2, a new plugin for LLM that bundles a quantized copy of the SmolLM2-135M-Instruct LLM inside of the Python package. This means you can now pip install a full LLM! If you're already using LLM you can install it like this: llm install llm-smollm2 Then run prompts like this: llm -m SmolLM2 'Are dogs real?' (New favourite test prompt for tiny models, courtes

I just released llm-smollm2, a new plugin for LLM that bundles a quantized copy of the SmolLM2-135M-Instruct LLM inside of the Python package.

This means you can now pip install a full LLM!

If you're already using LLM you can install it like this:

llm install llm-smollm2

Then run prompts like this:

llm -m SmolLM2 'Are dogs real?'

(New favourite test prompt for tiny models, courtesy of Tim Duffy. Here's the result).

If you don't have LLM yet first follow these installation instructions, or brew install llm or pipx install llm or uv tool install llm depending on your preferred way of getting your Python tools.

If you have uv setup you don't need to install anything at all! The following command will spin up an ephemeral environment, install the necessary packages and start a chat session with the model all in one go:

uvx --with llm-smollm2 llm chat -m SmolLM2

Finding a tiny model Building the plugin Packaging the plugin Publishing to PyPI Is the model any good? Finding a tiny model

The fact that the model is almost exactly 100MB is no coincidence: that's the default size limit for a Python package that can be uploaded to the Python Package Index (PyPI).

I asked on Bluesky if anyone had seen a just-about-usable GGUF model that was under 100MB, and Artisan Loaf pointed me to SmolLM2-135M-Instruct.

I ended up using this quantization by QuantFactory just because it was the first sub-100MB model I tried that worked.

Trick for finding quantized models: Hugging Face has a neat "model tree" feature in the side panel of their model pages, which includes links to relevant quantized models. I find most of my GGUFs using that feature.

Building the plugin

I first tried the model out using Python and the llama-cpp-python library like this:

uv run --with llama-cpp-python python

Then:

from llama_cpp import Llama from pprint import pprint llm = Llama(model_path="SmolLM2-135M-Instruct.Q4_1.gguf") output = llm.create_chat_completion(messages=[ {"role": "user", "content": "Hi"} ]) pprint(output)

This gave me the output I was expecting:

{'choices': [{'finish_reason': 'stop', 'index': 0, 'logprobs': None, 'message': {'content': 'Hello! How can I assist you today?', 'role': 'assistant'}}], 'created': 1738903256, 'id': 'chatcmpl-76ea1733-cc2f-46d4-9939-90efa2a05e7c', 'model': 'SmolLM2-135M-Instruct.Q4_1.gguf', 'object': 'chat.completion', 'usage': {'completion_tokens': 9, 'prompt_tokens': 31, 'total_tokens': 40}}

But it also spammed my terminal with a huge volume of debugging output - which started like this:

llama_model_load_from_file_impl: using device Metal (Apple M2 Max) - 49151 MiB free llama_model_loader: loaded meta data with 33 key-value pairs and 272 tensors from SmolLM2-135M-Instruct.Q4_1.gguf (version GGUF V3 (latest)) llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. llama_model_loader: - kv 0: general.architecture str = llama

And then continued for more than 500 lines!

I've had this problem with llama-cpp-python and llama.cpp in the past, and was sad to find that the documentation still doesn't have a great answer for how to avoid this.

So I turned to the just released Gemini 2.0 Pro (Experimental), because I know it's a strong model with a long input limit.

I ran the entire llama-cpp-python codebase through it like this:

cd /tmp git clone https://github.com/abetlen/llama-cpp-python cd llama-cpp-python files-to-prompt -e py . -c | llm -m gemini-2.0-pro-exp-02-05 \ 'How can I prevent this library from logging any information at all while it is running - no stderr or anything like that'

Here's the answer I got back. It recommended setting the logger to logging.CRITICAL, passing verbose=False to the constructor and, most importantly, using the following context manager to suppress all output:

from contextlib import contextmanager, redirect_stderr, redirect_stdout @contextmanager def suppress_output(): """ Suppresses all stdout and stderr output within the context. """ with open(os.devnull, "w") as devnull: with redirect_stdout(devnull), redirect_stderr(devnull): yield

This worked! It turned out most of the output came from initializing the LLM class, so I wrapped that like so:

with suppress_output(): model = Llama(model_path=self.model_path, verbose=False)

Proof of concept in hand I set about writing the plugin. I started with my simonw/llm-plugin cookiecutter template:

uvx cookiecutter gh:simonw/llm-plugin [1/6] plugin_name (): smollm2 [2/6] description (): SmolLM2-135M-Instruct.Q4_1 for LLM [3/6] hyphenated (smollm2): [4/6] underscored (smollm2): [5/6] github_username (): simonw [6/6] author_name (): Simon Willison

The rest of the plugin was mostly borrowed from my existing llm-gguf plugin, updated based on the latest README for the llama-cpp-python project.

There's more information on building plugins in the tutorial on writing a plugin.

Packaging the plugin

Once I had that working the last step was to figure out how to package it for PyPI. I'm never quite sure of the best way to bundle a binary file in a Python package, especially one that uses a pyproject.toml file... so I dumped a copy of my existing pyproject.toml file into o3-mini-high and prompted:

Modify this to bundle a SmolLM2-135M-Instruct.Q4_1.gguf file inside the package. I don't want to use hatch or a manifest or anything, I just want to use setuptools.

Here's the shared transcript - it gave me exactly what I wanted. I bundled it by adding this to the end of the toml file:

[tool.setuptools.package-data] llm_smollm2 = ["SmolLM2-135M-Instruct.Q4_1.gguf"]

Then dropping that .gguf file into the llm_smollm2/ directory and putting my plugin code in llm_smollm2/__init__.py.

I tested it locally by running this:

python -m pip install build python -m build

I fired up a fresh virtual environment and ran pip install ../path/to/llm-smollm2/dist/llm_smollm2-0.1-py3-none-any.whl to confirm that the package worked as expected.

Publishing to PyPI

My cookiecutter template comes with a GitHub Actions workflow that publishes the package to PyPI when a new release is created using the GitHub web interface. Here's the relevant YAML:

deploy: runs-on: ubuntu-latest needs: [test] environment: release permissions: id-token: write steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.13" cache: pip cache-dependency-path: pyproject.toml - name: Install dependencies run: | pip install setuptools wheel build - name: Build run: | python -m build - name: Publish uses: pypa/gh-action-pypi-publish@release/v1

This runs after the test job has passed. It uses the pypa/gh-action-pypi-publish Action to publish to PyPI - I wrote more about how that works in this TIL.

Is the model any good?

This one really isn't! It's not really surprising but it turns out 94MB really isn't enough space for a model that can do anything useful.

It's super fun to play with, and I continue to maintain that small, weak models are a great way to help build a mental model of how this technology actually works.

That's not to say SmolLM2 isn't a fantastic model family. I'm running the smallest, most restricted version here. SmolLM - blazingly fast and remarkably powerful describes the full model family - which comes in 135M, 360M, and 1.7B sizes. The larger versions are a whole lot more capable.

If anyone can figure out something genuinely useful to do with the 94MB version I'd love to hear about it.

Tags: pip, plugins, projects, pypi, python, ai, github-actions, generative-ai, edge-llms, llms, ai-assisted-programming, llm, gemini, uv, smollm, o3, llama-cpp


sqlite-s3vfs

sqlite-s3vfs Neat open source project on the GitHub organisation for the UK government's Department for Business and Trade: a "Python virtual filesystem for SQLite to read from and write to S3." I tried out their usage example by running it in a Python REPL with all of the dependencies uv run --python 3.13 --with apsw --with sqlite-s3vfs --with boto3 python It worked as advertised. When I

sqlite-s3vfs

Neat open source project on the GitHub organisation for the UK government's Department for Business and Trade: a "Python virtual filesystem for SQLite to read from and write to S3."

I tried out their usage example by running it in a Python REPL with all of the dependencies

uv run --python 3.13 --with apsw --with sqlite-s3vfs --with boto3 python

It worked as advertised. When I listed my S3 bucket I found it had created two files - one called demo.sqlite/0000000000 and another called demo.sqlite/0000000001, both 4096 bytes because each one represented a SQLite page.

The implementation is just 200 lines of Python, implementing a new SQLite Virtual Filesystem on top of apsw.VFS.

The README includes this warning:

No locking is performed, so client code must ensure that writes do not overlap with other writes or reads. If multiple writes happen at the same time, the database will probably become corrupt and data be lost.

I wonder if the conditional writes feature added to S3 back in November could be used to protect against that happening. Tricky as there are multiple files involved, but maybe it (or a trick like this one) could be used to implement some kind of exclusive lock between multiple processes?

Via Hacker News comment

Tags: apsw, sqlite, python, uv, s3


APSW SQLite query explainer

APSW SQLite query explainer Today I found out about APSW's (Another Python SQLite Wrapper, in constant development since 2004) apsw.ext.query_info() function, which takes a SQL query and returns a very detailed set of information about that query - all without executing it. It actually solves a bunch of problems I've wanted to address in Datasette - like taking an arbitrary query and figuring o

APSW SQLite query explainer

Today I found out about APSW's (Another Python SQLite Wrapper, in constant development since 2004) apsw.ext.query_info() function, which takes a SQL query and returns a very detailed set of information about that query - all without executing it.

It actually solves a bunch of problems I've wanted to address in Datasette - like taking an arbitrary query and figuring out how many parameters (?) it takes and which tables and columns are represented in the result.

I tried it out in my console (uv run --with apsw python) and it seemed to work really well. Then I remembered that the Pyodide project includes WebAssembly builds of a number of Python C extensions and was delighted to find apsw on that list.

... so I got Claude to build me a web interface for trying out the function, using Pyodide to run a user's query in Python in their browser via WebAssembly.

Claude didn't quite get it in one shot - I had to feed it the URL to a more recent Pyodide and it got stuck in a bug loop which I fixed by pasting the code into a fresh session.

Tags: pyodide, sqlite, claude, ai, llms, claude-artifacts, webassembly, ai-assisted-programming, python, generative-ai, apsw

Thursday, 06. February 2025

Ben Werdmüller

The Key Figures Working Alongside Elon Musk at DOGE and in the Trump Administration

[Avi Asher-Schapiro, Christopher Bing, Annie Waldman, Brett Murphy, Andy Kroll, Justin Elliott, Kirsten Berg, Sebastian Rotella, Alex Mierjeski, Pratheek Rebala and Al Shaw at ProPublica] My colleagues at ProPublica have published the largest list yet of who is actually involved in DOGE: "While some have been public about their involvement, others have attempted to keep thei

[Avi Asher-Schapiro, Christopher Bing, Annie Waldman, Brett Murphy, Andy Kroll, Justin Elliott, Kirsten Berg, Sebastian Rotella, Alex Mierjeski, Pratheek Rebala and Al Shaw at ProPublica]

My colleagues at ProPublica have published the largest list yet of who is actually involved in DOGE:

"While some have been public about their involvement, others have attempted to keep their roles secret, scrubbing LinkedIn pages and other sources of data. With little information from the White House, ProPublica is attempting to document who is involved and what they are doing."

This is a living document: ProPublica is still reporting. As the article points out:

"We are still reporting. Do you have information about any of the people listed below? Do you know of any other Musk associates who have entered the federal government? You can reach our tip line. Please be as specific, detailed and clear as you can."

The whole list is worth reviewing.

#Democracy

[Link]


Simon Willison

Datasette 1.0a17

Datasette 1.0a17 New Datasette alpha, with a bunch of small changes and bug fixes accumulated over the past few months. Some (minor) highlights: The register_magic_parameters(datasette) plugin hook can now register async functions. (#2441) Breadcrumbs on database and table pages now include a consistent self-link for resetting query string parameters. (#2454) New internal methods datase

Datasette 1.0a17

New Datasette alpha, with a bunch of small changes and bug fixes accumulated over the past few months. Some (minor) highlights:

The register_magic_parameters(datasette) plugin hook can now register async functions. (#2441) Breadcrumbs on database and table pages now include a consistent self-link for resetting query string parameters. (#2454) New internal methods datasette.set_actor_cookie() and datasette.delete_actor_cookie(), described here. (#1690) /-/permissions page now shows a list of all permissions registered by plugins. (#1943) If a table has a single unique text column Datasette now detects that as the foreign key label for that table. (#2458) The /-/permissions page now includes options for filtering or exclude permission checks recorded against the current user. (#2460)

I was incentivized to push this release by an issue I ran into in my new datasette-load plugin, which resulted in this fix:

Fixed a bug where replacing a database with a new one with the same name did not pick up the new database correctly. (#2465)

Tags: projects, annotated-release-notes, datasette


sqlite-page-explorer

sqlite-page-explorer Outstanding tool by Luke Rissacher for understanding the SQLite file format. Download the application (built using redbean and Cosmopolitan, so the same binary runs on Windows, Mac and Linux) and point it at a SQLite database to get a local web application with an interface for exploring how the file is structured. Here's it running against the datasette.io/content databa

sqlite-page-explorer

Outstanding tool by Luke Rissacher for understanding the SQLite file format. Download the application (built using redbean and Cosmopolitan, so the same binary runs on Windows, Mac and Linux) and point it at a SQLite database to get a local web application with an interface for exploring how the file is structured.

Here's it running against the datasette.io/content database that runs the official Datasette website:

Via Hacker News

Tags: redbean, sqlite, cosmopolitan, lua


The future belongs to idea guys who can just do things

The future belongs to idea guys who can just do things Geoffrey Huntley with a provocative take on AI-assisted programming: I seriously can't see a path forward where the majority of software engineers are doing artisanal hand-crafted commits by as soon as the end of 2026. He calls for companies to invest in high quality internal training and create space for employees to figure out these

The future belongs to idea guys who can just do things

Geoffrey Huntley with a provocative take on AI-assisted programming:

I seriously can't see a path forward where the majority of software engineers are doing artisanal hand-crafted commits by as soon as the end of 2026.

He calls for companies to invest in high quality internal training and create space for employees to figure out these new tools:

It's hackathon (during business hours) once a month, every month time.

Geoffrey's concluding note resonates with me. LLMs are a gift to the fiercely curious and ambitious:

If you’re a high agency person, there’s never been a better time to be alive...

Tags: ai-assisted-programming, llms, ai, generative-ai


The Pragmatic Engineer

The Pulse #123: Big Tech using its distribution advantage to win in AI?

Big Tech companies seem to have learned the lesson on how they became dominant in the past. So most of them are giving away AI functionality for free – even if this could be at loss for them.

The Pulse is a series covering insights, patterns, and trends within Big Tech and startups. Notice an interesting event or trend? Send me a message.

Today, we cover:

Industry pulse. Where TikTok’s software engineers went, Apple Intelligence half-baked at launch, former FTC chair Lina Khan warns of reduced competition, OpenAI launches autonomous browser agent, Apple drops its AR glasses, with Meta also facing struggles – and more

Big Tech using distribution to win at AI? Meta, Microsoft, and Google are using their distribution power and financial muscle to give away AI features for free to users and customers. It’s a sensible way to avoid disruption, which makes it much harder for startups to compete

Before we start: thank you for all the thoughtful comments on last week’s issue about DeepSeek rocking the tech industry. I corrected a few details based on feedback – most notably how DeepSeek’s cost efficiency seems to be closer to 4-5x that of OpenAI, not 10-40x. See the updated issue here.

1. Industry Pulse Where did TikTok’s software engineers go?

The past six months has been something of a Doomsday scenario-esque countdown for TikTok, as the start date of its ban in the US crept ever closer. In the event, TikTok did indeed go offline for a few hours on 19 January, before President Trump gave the social network a stay of execution lasting 75 days.

How has this uncertainty affected software engineers at the Chinese-owned social network? According to data shared exclusively with The Pragmatic Engineer by Live Data Technologies, which tracks real-time live job change data across more than 160M professionals, this is how:

Where engineers went after TikTok, and where they joined from. Source: Live Data Technologies

There’s been an outflow of engineers to:

Big Tech: Meta, Google, Amazon (and AWS), Microsoft and Apple.

Publicly traded tech companies: Snap, Pinterest, Snowflake, DoorDash, NVIDIA, Coinbase, Coupang, Salesforce, Uber

Few private companies: X (formerly: Twitter) and OpenAI

It seems the uncertainty has motivated TikTok engineers to interview and quit when they get an offer. Still, I find it surprising that hardly any scaleups are popular destinations among TikTok leavers. To me, it indicates that people quit for better liquid total compensation packages; which may be why publicly traded companies are the most popular destination.

Apple Intelligence half-baked?

Read more


Ben Werdmüller

Update on the 2024/2025 End of Term Web Archive

[Caralee Adams at the Internet Archive] The Internet Archive is always a gem, but it's been particularly important this year. "With two-thirds of the process complete, the 2024/2025 EOT crawl has collected more than 500 terabytes of material, including more than 100 million unique web pages. All this information, produced by the U.S. government—the largest publisher in the w

[Caralee Adams at the Internet Archive]

The Internet Archive is always a gem, but it's been particularly important this year.

"With two-thirds of the process complete, the 2024/2025 EOT crawl has collected more than 500 terabytes of material, including more than 100 million unique web pages. All this information, produced by the U.S. government—the largest publisher in the world—is preserved and available for public access at the Internet Archive.

[...] As an added layer of preservation, the 2024/2025 EOT Web Archive will be uploaded to the Filecoin network for long-term storage, where previous term archives are already stored. While separate from the EOT collaboration, this effort is part of the Internet Archive’s Democracy’s Library project. Filecoin Foundation (FF) and Filecoin Foundation for the Decentralized Web (FFDW) support Democracy’s Library to ensure public access to government research and publications worldwide."

This is important on multiple levels: most importantly, it means that even if the Internet Archive is attacked or shut down for any reason, these archived versions of government websites and data will remain online and accessible.

As it happens, the current administration has been pulling down datasets and redacting websites with wild abandon, so although this is a routine activity for the Archive whenever there's a change in administration, it provides a vital historical record this year. Good news for researchers, future historians, journalists, and anyone who depended on this data.

#Democracy

[Link]


Simon Willison

Quoting Andrej Karpathy

There's a new kind of coding I call "vibe coding", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It's possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard. I ask for the dumbest things like "decrease the padding on the sidebar by half"

There's a new kind of coding I call "vibe coding", where you fully give in to the vibes, embrace exponentials, and forget that the code even exists. It's possible because the LLMs (e.g. Cursor Composer w Sonnet) are getting too good. Also I just talk to Composer with SuperWhisper so I barely even touch the keyboard.

I ask for the dumbest things like "decrease the padding on the sidebar by half" because I'm too lazy to find it. I "Accept All" always, I don't read the diffs anymore. When I get error messages I just copy paste them in with no comment, usually that fixes it. The code grows beyond my usual comprehension, I'd have to really read through it for a while. Sometimes the LLMs can't fix a bug so I just work around it or ask for random changes until it goes away.

It's not too bad for throwaway weekend projects, but still quite amusing. I'm building a project or webapp, but it's not really coding - I just see stuff, say stuff, run stuff, and copy paste stuff, and it mostly works.

Andrej Karpathy

Tags: andrej-karpathy, ai-assisted-programming, generative-ai, ai, llms


Ben Werdmüller

You Can’t Post Your Way Out of Fascism

[Janus Rose at 404 Media] This is an important but hard pill to swallow: "“The reality is you are oxygenating the things these people are saying even as you purport to debunk them,” Katherine Cross, a sociologist and author of Log Off: Why Posting and Politics (Almost) Never Mix, told 404 Media. “Whether it’s [New York Times columnist] Ross Douthat providing a sane-washing g

[Janus Rose at 404 Media]

This is an important but hard pill to swallow:

"“The reality is you are oxygenating the things these people are saying even as you purport to debunk them,” Katherine Cross, a sociologist and author of Log Off: Why Posting and Politics (Almost) Never Mix, told 404 Media. “Whether it’s [New York Times columnist] Ross Douthat providing a sane-washing gloss on Trump’s mania or people on social media vehemently disagreeing and dunking on it, they’re legitimizing it as part of the discourse.”"

Posting is not activism. But it's both easy and cathartic to take the bait and run with it - and get approving clicks and likes in return. In sharing outrage rather than concrete real-world steps, we end up just amplifying the message.

As Janus Rose points out:

"Under this status quo, everything becomes a myopic contest of who can best exploit peoples’ anxieties to command their attention and energy. If we don’t learn how to extract ourselves from this loop, none of the information we gain will manifest as tangible action—and the people in charge prefer it that way."

Instead, co-ordinate online but manifest in the real world. Join protests, call your representatives, work for organizations that seek to uncover truth and take steps forward. Fewer hot takes; more collective action.

#Democracy

[Link]


Doc Searls Weblog

What Makes an AI personal?

The unintended risks of handing over our lives to Personal AI is the headline of the opening segment of Jamie Smith‘s newsletter today. In it he shares a post by Liz Gerber about an autonomous choice made by the AI in her self-parking car: Last night, my car automatically parked in the grocery store parking […]
The image above answered this prompt to ChatGPT: “Give me an image of a personal AI: one belonging to the individual and in control of the individual.” I added the text. It’s not perfect, or even close. But I’m rushed and not sure iterating this will get us anything better.

The unintended risks of handing over our lives to Personal AI is the headline of the opening segment of Jamie Smith‘s newsletter today. In it he shares a post by Liz Gerber about an autonomous choice made by the AI in her self-parking car:

Last night, my car automatically parked in the grocery store parking lot. The car beautifully maneuvered itself into a parking spot avoiding colliding with other cars and people walking through the lot.

However the car prioritized performance, fine tuning its movement in the parking spot as my fellow shoppers waited in below freezing temperatures for the car to do a perfect job.

The car failed to register that one shopper was a mom with a crying child in her arms and a toddler tugging at her leg. And it failed to take into account the several cars that were waiting to turn into the parking lot, causing a backup on the street.

While the experience was delightful for me, the car was inconsiderate of others. Even worse, I didn’t notice the others until after the car had parked itself.

I didn’t stop my car from prioritizing my needs over others. I not only handed over steering to my car, I handed over my humanity.

Jamie then asks, What happens when we hand over our experiences – often very human experiences – to an AI agent? and added in summary, Digital wallets and Personal AI are going to have a transformative effect on our lives and society. But let’s make sure we don’t hand over our humanity with it. 

Here’s another question: Is the AI in Liz’s car personal?

If we want truly personal AI—the kind under our control, working for us, enlarging our agency in the world—the answer to that question has to be no.

The AI in Liz’s car is not hers. It belongs to the car’s maker. It does not contain or express her humanity or extend her agency. It may be personalized, but it is not personal. (About the difference.)

We don’t have personal AI yet. (One bit of evidence is the image ChatGPT generated for me, above.) Yes, there is plentiful personalized AI, but nothing as personal as your pants, your PC, or the car you operate entirely on your own. Nothing that makes you more independent, not less.

We’re working at Kwaai on an open-source personal AI operating system (pAI-OS). There are other projects as well. But we don’t yet have a personal AI that does all the things this image suggests—

—much less an AI of our own that can express our ethical preferences.

Meanwhile, we need to be careful not to call the AIs in our things (especially big dangerous ones, such as cars) personal. They are not.

Personal AI is a greenfield. And there is a risk nothing will grow in it if we keep calling stuff like a car’s autonomous parking “personal AI.”

Oh, and you won’t find a better voice for personal empowerment in the digital world than Jamie Smith‘s. Please subscribe to his newsletter.

 


Ben Werdmüller

Move fast and break democracy

For the last few years, AI vendors have had an interesting marketing playbook: they’ve described the potential power of the technologies as being so great that it could lead to an artificial general intelligence that could either kill humanity or leave us behind and head for the stars. We ignore its power at our peril. As it turned out, OpenAI and Microsoft’s definition of “artificial general

For the last few years, AI vendors have had an interesting marketing playbook: they’ve described the potential power of the technologies as being so great that it could lead to an artificial general intelligence that could either kill humanity or leave us behind and head for the stars. We ignore its power at our peril.

As it turned out, OpenAI and Microsoft’s definition of “artificial general intelligence” was that the technologies would reach one hundred billion dollars in revenue. It wasn’t tied to capabilities around reasoning, and did not, in actuality, relate to a Terminator future. It just meant that they’d be making a lot of money from it. All the talk of humanity-destroying intelligence and the existential questions that derived from it just served to draw attention to their services. The awe inspired by the tales they were weaving would, they hoped, lead to more signed contracts, more subscribers, more dollars on their balance sheets. People would treat the technologies as being insanely powerful even if they weren’t, and that would be enough.

A decade or more ago, a new ride-sharing service called Uber started to supplant taxi services in major cities like San Francisco. While taxi services were typically licensed, often at great cost to the individual drivers, Uber drivers operated without any such restrictions. It was illegal in many cities, but the company intentionally created workarounds to prevent police, city officials, and taxi firms from gathering evidence. A tool nicknamed Greyball allowed them to tag users who they decided were trying to conduct a sting on the service. Those users would see fake cars, and their drivers would cancel quickly. In the midst of this disinformation, it became hard to gather real evidence and make a case.

Eventually, despite its illegality, Uber became saturated in each market. Cities found themselves either acquiescing or making regulatory deals with the company. Uber had evaded the authorities while growing quickly, and it became widely used. It was clear that cities were going to have trouble shutting it down, so they ultimately adjusted to accept its existence. Law enforcement had been too slow; Uber had outrun and outmaneuvered it, and now it was here to stay.

The same playbooks that have allowed high-growth tech companies to become effective monopolies in America are now being used on American governance itself.

Donald Trump is not a king and does not have the right to wield absolute power. He and his parties control all three branches of government, the executive, legislative, and judicial branches are all Republican-dominated, but avenues for objection, checks on his power, and levers to limit his reach remain. But that doesn’t necessarily matter: Donald Trump is acting like a king. He is restructuring the government as if he were one, making statement after statement to reinforce that image. Much of it is hot air: things that will never come to pass. But just as if AI vendors pretend all-powerful artificial intelligence exists, people will act as if it does, I believe Trump’s CEO king act is designed to make us act as if there are no checks or limits on his abilities. We are meant to gaze in awe, and his critics to feel despondent, so that he can cement his imaginary powers for real and conduct his illegal business with impunity regardless of the regulations.

DOGE, which subsumed the USDS to become the awkwardly-named United States Department of Government Efficiency Service, is running ahead of regulations with the same gusto that Uber did during its early years. It should go without saying that inviting recent high school graduates and early twenty-somethings with no security clearance to wantonly access the personal data of every American, and to alter the source code that controls core government services, is illegal. It’s so outlandish that it sounds absolutely bizarre when you describe it out loud, like something from a speculative fiction fever dream, but it’s happening in plain sight. There are plenty of rules in place to prevent their activities from taking place. But who is going to catch up to them?

Eventually, DOGE will either be stopped or face regulatory restrictions on its activities and reach. But by then, it will be too late: the code will be altered, the personal information will be revealed, the funding spigot to core government services will have withered them on the vine. Legal objections have peppered up everywhere, but the cogs of justice are far slower than a bunch of entrepreneurial kids with the keys to the city. Lawmakers and civil rights organizations can shake their fists and say it’s illegal, but it’s done. DOGE isn’t just evading oversight: it’s moving fast and breaking things on a scale even Uber never dreamed of. It’s governance as a high-growth startup, where rule-breaking isn’t a side effect — it’s the entire strategy.

The important thing isn’t so much who is doing it as what is being done. Much has been made of the fact that Elon Musk is unelected, which is true: he is a private citizen with highly personal motives doing this work under dubious auspices. But the events of the last few weeks would be heinous even if they were conducted directly by elected officials acting in good faith. Stopping Musk from doing these things is a good idea, but the core problem is the acts, not the man.

The question, then, is what we do next.

In the New York Times, Jamelle Bouie points out that this wasn’t what brought most Trump voters to the polls:

For as much as some of Trump’s and Musk’s moves were anticipated in Project 2025, the fact of the matter is that marginal Trump voters — the voters who gave him his victory — did not vote for any of this. They voted specifically to lower the cost of living. They did not vote, in Musk’s words, for economic “hardship.” Nor did they vote to make Musk the co-president of the United States or to give Trump the power to destroy the capacity of the federal government to do anything that benefits the American people. They certainly did not vote for a world where the president’s billionaire ally has access to your Social Security number.

One task is to pierce the reality distortion field of Trump’s court in the eyes of his opponents. We don’t live in a full-scale dictatorship (at least, not yet). All of this can be stopped. His power is limited, and can be curtailed. And at the center of it all, he is a small-minded former reality TV star with a tiny worldview who eats his steak overcooked and throws his plate at the wall when he’s having a tantrum. The emperor has no clothes, and those that oppose him must see that clearly. The bigger task is revealing that fact to the more reasonable of the people who elected him: people for whom the cost of living is more important than enacting some kind of perverse revenge on inclusive society.

Then I believe the next task is to build an alternative, not in reaction to Trump, but in itself, based on upholding core values and improving everybody’s quality of life. One of the challenges of being aghast at what is going on is that American institutions really have underserved the American people, and have often caused real harm overseas. It’s easy — and correct — to be worried about what it means to suddenly encourage the entire CIA to resign, but it’s an awkward rhetorical position to be put in to defend the institution. The CIA has a long history of arguably criminal behavior: conducting undemocratic coups, assassinating world leaders, and violating human rights in our name.

The status quo doesn’t work. The American people have made that clear. So it’s on us to invent something new. What does it mean to create a truly inclusive, peaceful, democratic society? What does it mean to have a peaceful foreign policy? What does it mean to focus on improving quality of life rather than an economic metric that encourages monopolies and billionaires while letting ordinary people suffer?

The playbooks of OpenAI, Uber, and others have long been countered by other modes of operating. Hockey-stick growth is not the only way to build software and serve people who need help. Co-operation, mutual aid, and collective collaboration have effectively re-made software, and through it the world, and we’re now seeing the fruit of that through movements like the open social web. High-growth tech has the flashy marketing moves and the attendant hype cycle, but quietly, other movements have been steadily building. The same is true for America.

As Bouie says in his piece:

Whatever comes next, should the country weather this attempted hijacking, will need to be a fundamental rethinking of what this system is and what we want out of it.

Anything less will set us up for yet another Trump and yet another Musk.

I believe this is correct, and offer this idea for consideration:

The people with the ideas that can best save America are the people who are currently being pushed out of it. This is not a coincidence. Black women, trans activists, communities built on radical inclusion and emergent strategies, worker’s groups and communities bound in solidarity have created modes of communication and support that have transformed American society of the better. These are people for whom the shock and awe of a smoke and mirrors campaign does not work; who cannot be convinced to fit into a template designed to force people into being someone else’s profit engine; who have demonstrated the unstoppable nature of peer to peer mutual aid. It makes them dangerous. It also makes them more powerful than the dying gasp of the twentieth century we’re seeing sputter out before us.

We should listen to them: people who are often at the edges even though they deserve to sit at the center of society. They often see harms perpetuated before everybody else; they often see the solutions first, too. It’s not that it’s on them to save everybody else. It’s that they’ve been sounding the alarm and telling us what to do for decades, and nobody has been listening. It’s about time we did.

The same playbooks that have created monopolies, crushed labor rights, and gamed regulations are now being used to gut democratic governance itself. But these playbooks have always had an alternative: one rooted in cooperation, mutual aid, and community-driven solutions. That alternative exists; it’s just been drowned out by billionaires and venture-backed empire-builders. It’s time to listen to the people who have been building it all along.

Wednesday, 05. February 2025

IdM Laboratory

そういえばEUDIW Architecture Reference Framework 1.5.0が出てますね

こんにちは、富士榮です。 そういえば2月4日にEUDIW ARFの1.5.0が出てますね。 https://eu-digital-identity-wallet.github.io/eudi-doc-architecture-and-reference-framework/latest/architecture-and-reference-framework-main/ GithubのCHANGELOGを見ると The ARF is aligned with the adopted Implementing Acts, covering articles 5a and 5c of the eIDAS Regulation.  The ARF also includes changes in response to comments provid
こんにちは、富士榮です。
そういえば2月4日にEUDIW ARFの1.5.0が出てますね。 https://eu-digital-identity-wallet.github.io/eudi-doc-architecture-and-reference-framework/latest/architecture-and-reference-framework-main/


GithubのCHANGELOGを見ると The ARF is aligned with the adopted Implementing Acts, covering articles 5a and 5c of the eIDAS Regulation.  The ARF also includes changes in response to comments provided on Github and by other stakeholders. Over more than 275 comments lead to changes in the ARF. とのことです。 まぁ、中を見ろ、と。

Simon Willison

S1: The $6 R1 Competitor?

S1: The $6 R1 Competitor? Tim Kellogg shares his notes on a new paper, s1: Simple test-time scaling, which describes an inference-scaling model fine-tuned on top of Qwen2.5-32B-Instruct for just $6 - the cost for 26 minutes on 16 NVIDIA H100 GPUs. Tim highlight the most exciting result: After sifting their dataset of 56K examples down to just the best 1K, they found that the core 1K is all

S1: The $6 R1 Competitor?

Tim Kellogg shares his notes on a new paper, s1: Simple test-time scaling, which describes an inference-scaling model fine-tuned on top of Qwen2.5-32B-Instruct for just $6 - the cost for 26 minutes on 16 NVIDIA H100 GPUs.

Tim highlight the most exciting result:

After sifting their dataset of 56K examples down to just the best 1K, they found that the core 1K is all that's needed to achieve o1-preview performance on a 32B model.

The paper describes a technique called "Budget forcing":

To enforce a minimum, we suppress the generation of the end-of-thinking token delimiter and optionally append the string “Wait” to the model’s current reasoning trace to encourage the model to reflect on its current generation

That's the same trick Theia Vogel described a few weeks ago.

Here's the s1-32B model on Hugging Face. I found a GGUF version of it at brittlewis12/s1-32B-GGUF, which I ran using Ollama like so:

ollama run hf.co/brittlewis12/s1-32B-GGUF:Q4_0

I also found those 1,000 samples on Hugging Face in the simplescaling/s1K data repository there.

I used DuckDB to convert the parquet file to CSV (and turn one VARCHAR[] column into JSON):

COPY ( SELECT solution, question, cot_type, source_type, metadata, cot, json_array(thinking_trajectories) as thinking_trajectories, attempt FROM 's1k-00001.parquet' ) TO 'output.csv' (HEADER, DELIMITER ',');

Then I loaded that CSV into sqlite-utils so I could use the convert command to turn a Python data structure into JSON using json.dumps() and eval():

# Load into SQLite sqlite-utils insert s1k.db s1k output.csv --csv # Fix that column sqlite-utils convert s1k.db s1u metadata 'json.dumps(eval(value))' --import json # Dump that back out to CSV sqlite-utils rows s1k.db s1k --csv > s1k.csv

Here's that CSV in a Gist, which means I can load it into Datasette Lite.

It really is a tiny amount of training data. It's mostly math and science, but there are also 15 cryptic crossword examples.

Tags: duckdb, datasette-lite, inference-scaling, ai, ollama, llms, datasette, generative-ai, qwen


The Pragmatic Engineer

AI Engineering with Chip Huyen

On today’s episode of The Pragmatic Engineer, I’m joined by Chip Huyen, a computer scientist, author of the freshly published O’Reilly book AI Engineering, and an expert in applied machine learning.

Before we start: a rare giveaway! To celebrate the podcast’s YouTube channel crossing 100K subscribers, I’m doing a giveaway of 100 books (10 of them signed and shipped) and 100 newsletter subscriptions. To enter, just subscribe to the podcast on the platform you use, leave a star review, and fill out this form, indicating you’d like to participate. The giveaway closes in 72 hours. More details here.

Stream the Latest Episode

Available now on YouTube, Apple and Spotify. See the episode transcript at the top of this page, and a summary at the bottom.

Brought to You By

Swarmia — The engineering intelligence platform for modern software organizations.

Graphite — The AI developer productivity platform.

Vanta — Automate compliance and simplify security with Vanta.

In This Episode

On today’s episode of The Pragmatic Engineer, I’m joined by Chip Huyen, a computer scientist, author of the freshly published O’Reilly book AI Engineering, and an expert in applied machine learning. Chip has worked as a researcher at Netflix, was a core developer at NVIDIA (building NeMo, NVIDIA’s GenAI framework), and co-founded Claypot AI. She also taught Machine Learning at Stanford University.

In this conversation, we dive into the evolving field of AI Engineering and explore key insights from Chip’s book, including:

• How AI Engineering differs from Machine Learning Engineering

• Why fine-tuning is usually not a tactic you’ll want (or need) to use

• The spectrum of solutions to customer support problems – some not even involving AI!

• The challenges of LLM evals (evaluations)

• Why project-based learning is valuable—but even better when paired with structured learning

• Exciting potential use cases for AI in education and entertainment

• And more!

Takeaways

My biggest takeaways from this episode:

1. “AI engineering” feels closer to software engineering than to ML engineering. The term itself is very new, and “AI engineering” evolved from ML engineering. A big difference is that thanks to LLMs being easy to use (both via APIs, and locally) “AI engineering” is much more about building a product first – and later on, getting around to tweaking the model itself. ML engineering was the other way around: spend a lot of time building a model, and then build an application on it.

2. To get good at AI engineering, focus on the basics. Understand what an LLM is (and how it works), how to evaluate them, how to use RAG, what finetuning is, and how to optimize inference. All of these techniques are foundational, and will remain important in a few years’ time as well. Chip’s book AI Engineering covers all these topics.

3. “The more we want to not miss out on things, the more things we will miss.” When I asked Chip about what she thinks about the fear of missing out (FOMO) across AI: she said it’s ironic that when you are worried about missing out, and keep up with everything new – you stay shallow! Chip doesn’t read news: she chooses to focus on deep research or learning instead. If there’s something that is important today: it will be important next week, after she’s done finishing learning whatever she was focused on.

4. Solving the problem is more important than using the latest AI tools. Amusingly, a lot of teams miss this part: and they build overcompliacated AI solutions that do practically nothing for the business.

Before the interview, I’ve started to go through Chip’s newly published book: AI Engineering. It feels to me this book will become a desk reference, and I recommend it.

The Pragmatic Engineer deepdives relevant for this episode

Applied AI Software Engineering: RAG

How do AI software engineering agents work?

AI Tooling for Software Engineers in 2024: Reality Check

IDEs with GenAI features that Software Engineers love

Timestamps

(00:00) Intro

(01:31) A quick overview of AI Engineering

(06:45) How Chip ensured her book stays current amidst the rapid advancements in AI

(11:35) A definition of AI Engineering and how it differs from Machine Learning Engineering

(18:15) Simple first steps in building AI applications

(24:38) An explanation of BM25 (retrieval system)

(25:28) The problems associated with fine-tuning

(29:40) Simple customer support solutions for rolling out AI thoughtfully

(35:29) Chip’s thoughts on staying focused on the problem

(37:04) The challenge in evaluating AI systems

(40:03) Use cases in evaluating AI

(43:09) The importance of prioritizing users’ needs and experience

(48:09) Common mistakes made with Gen AI

(53:57) A case for systematic problem solving

(54:57) Project-based learning vs. structured learning

(1:00:07) Why AI is not the end of engineering

(1:04:56) How AI is helping education and the future use cases we might see

(1:08:58) Rapid fire round

A summary of the conversation What is AI engineering?

AI engineering is a shift from machine learning to more engineering and product-focused work.

Previously, building machine learning applications required creating custom models, necessitating data and expertise in model training. Now, AI models can be used simply by making API calls. This lowers the barrier to entry and eliminates the need for specialized ML/AI degrees or to have large amounts of data collected.

Machine learning engineers did a lot of preparation work. They traditionally focused on data collection, annotation, and model training before deployment. AI engineering, in contrast, starts with a product idea and then progresses to data gathering and working with models.

AI Engineering is a new term. It emerged because the role is different from traditional Machine Learning Engineering. Chip surveyed people building applications on top of foundation models, and 'AI Engineering' was the most common way to describe what they did – so she stuck with this name!

A key difference compared to ML engineering: AI engineers often begin with readily available APIs or pre-trained models. This means they can start to prototype and iterate early on. They will only consider building custom models much, much later! See how e.g. Perplexity started to build their own AI models after their product was launched as the first version.

Ways to build AI applications

Start with basics. Understand what a “good response” and a “bad response” means. To do so, you need to set guidelines and evaluate responses. Use both automation and manual review.

Retrieval-augmented generation (RAG) is a commonly used pattern for adding context to model responses. RAG involves retrieving relevant documents or information to augment the model's context. We previously did a deepdive on RAG.

Keyword retrieval. Many equate RAG with vector search, but a simpler approach may be more effective initially. Try keyword retrieval before doing vector searches: as vector databases can be costly and may obscure specific keywords.

Data preparation and chunking are important to get right for RAG. Techniques such as extracting metadata or keywords from documents can significantly improve performance, potentially more than focusing on the database itself.

Fine-tuning: often a last resort and many teams never do it. This is due to the complexities of hosting and maintaining a fine-tuned model. The rapid pace of model development also makes it difficult for fine-tuned models to maintain their advantage over time.

One step at a time. Take a structured approach: starting with prompting, adding data, and then move to more complex methods if needed. Understand that the problem being solved is more important than using the latest technology.

Resist the urge to ship only incremental improvements. Building out new use cases is usually far more beneficial.

Practical approaches and avoiding pitfalls

Start with a human in the loop. After that, gradually increase automation as confidence in the AI solution grows. A phased rollout, starting with internal use cases, can help to mitigate risk.

Focus on solving the problem, not just using AI. Apply the simplest solutions to remove roadblocks.

Common mistakes:

Using GenAI when it’s not needed. Some problems may be better solved with simpler solutions like spreadsheets or manually scheduling tasks.

Abandoning GenAI when it doesn’t seem to work, without pinpointing where the process fails. Reasons for GenAI not (yet) working could be in data extraction or text processing. Don’t give up too easily!

Jumping into complex solutions like vector databases or fine-tuning without addressing simpler approaches.

Be careful about using untested or rapidly changing AI frameworks because they can introduce bugs and issues.

Evaluating AI systems

A difficult area, because as AI becomes more sophisticated, it is harder to assess the output. A convincing summary might not be a good summary, and a math solution from AI can be hard to evaluate if one does not know the answer.

There is no single, simple solution to evaluation. Instead, a combination of methods is required and talking to users, analysing their interactions and manual data inspections are essential.

Measure what matters. Sometimes, what seems intuitive isn’t what users actually want, for example, a meeting summarisation tool focusing on action items instead of overall content.

Do not skip the hard and manual work! Manual data inspection is critical and still offers the highest ratio of value

Human evaluations are important for seeing how users are actually using the product and to correlate with automated metrics.

Learning AI Engineering

Two ways of learning:

Project-based learning: pick up a project and working through all the problems.

Structured learning: taking courses or reading books.

Tutorials are great but it's important to stop and ask questions. Without that, tutorials can lead to mindlessly copying code without understanding it.

Combine project-based learning with structured learning. Also, observe your own workflow and see what parts can be automated by AI to get use case ideas.

Coding is not the same as software engineering. Software engineering is about solving problems, and while AI can automate coding, it cannot fully automate the problem-solving process.

AI can enable software engineers to build much more complex software.

AI will not eliminate software engineering because it can only automate part of the software engineering process. The need for precision in software development requires someone who understands the nuances of code.

Resources & Mentions

Where to find Chip Huyen:

• X: https://x.com/chipro

• LinkedIn: https://www.linkedin.com/in/chiphuyen/

• Website: https://huyenchip.com/

Mentions during the episode:

• AI Engineering: Building Applications with Foundation Models: https://www.amazon.com/AI-Engineering-Building-Applications-Foundation/dp/1098166302/r

• DeepSeek: https://www.deepseek.com/

• Multimodality and Large Multimodal Models (LMMs): https://huyenchip.com/2023/10/10/multimodal.html

• BM25: https://en.wikipedia.org/wiki/Okapi_BM25

• Microsoft Bot Framework: https://dev.botframework.com/

• Python: https://www.python.org/

• Javascript: https://www.javascript.com/

• ChatGPT: https://chatgpt.com/

• Claude: https://claude.ai/

• Llama: https://www.llama.com/

• Complex Adaptive Systems: An Introduction to Computational Models of Social Life (Princeton Studies in Complexity): https://www.amazon.com/Complex-Adaptive-Systems-Introduction-Computational/dp/0691127026/

• The Selfish Gene: https://www.amazon.com/Selfish-Gene-Anniversary-Landmark-Science/dp/0198788606/

• Antifragile: Things That Gain from Disorder: https://www.amazon.com/dp/0812979680/

Production and marketing by Pen Name. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.


Simon Willison

Gemini 2.0 is now available to everyone

Gemini 2.0 is now available to everyone Big new Gemini 2.0 releases today: Gemini 2.0 Pro (Experimental) is Google's "best model yet for coding performance and complex prompts" - currently available as a free preview. Gemini 2.0 Flash is now generally available. Gemini 2.0 Flash-Lite looks particularly interesting: We’ve gotten a lot of positive feedback on the price and speed of 1.

Gemini 2.0 is now available to everyone

Big new Gemini 2.0 releases today:

Gemini 2.0 Pro (Experimental) is Google's "best model yet for coding performance and complex prompts" - currently available as a free preview. Gemini 2.0 Flash is now generally available.

Gemini 2.0 Flash-Lite looks particularly interesting:

We’ve gotten a lot of positive feedback on the price and speed of 1.5 Flash. We wanted to keep improving quality, while still maintaining cost and speed. So today, we’re introducing 2.0 Flash-Lite, a new model that has better quality than 1.5 Flash, at the same speed and cost. It outperforms 1.5 Flash on the majority of benchmarks.

That means Gemini 2.0 Flash-Lite is priced at 7.5c/million input tokens and 30c/million output tokens - half the price of OpenAI's GPT-4o mini (15c/60c).

Gemini 2.0 Flash isn't much more expensive: 10c/million for text/image input, 70c/million for audio input, 40c/million for output. Again, cheaper than GPT-4o mini.

I pushed a new LLM plugin release, llm-gemini 0.10, adding support for the three new models:

llm install -U llm-gemini llm keys set gemini # paste API key here llm -m gemini-2.0-flash "impress me" llm -m gemini-2.0-flash-lite-preview-02-05 "impress me" llm -m gemini-2.0-pro-exp-02-05 "impress me"

Here's the output for those three prompts.

I ran Generate an SVG of a pelican riding a bicycle through the three new models. Here are the results, cheapest to most expensive:

gemini-2.0-flash-lite-preview-02-05

gemini-2.0-flash

gemini-2.0-pro-exp-02-05

Full transcripts here.

I also ran the same prompt I tried with o3-mini the other day:

cd /tmp git clone https://github.com/simonw/datasette cd datasette files-to-prompt datasette -e py -c | \ llm -m gemini-2.0-pro-exp-02-05 \ -s 'write extensive documentation for how the permissions system works, as markdown' \ -o max_output_tokens 10000

Here's the result from that - you can compare that to o3-mini's result here.

Tags: gemini, llm, google, generative-ai, llm-pricing, ai, llms, pelican-riding-a-bicycle


Wrench in the Gears

Follow Up On Quantum Realism In Connection With Gordon Pask’s Mechanical Theatricality – Plus A “Diamond Age” Excerpt Read Aloud

This is a follow up to yesterday’s video reiterating my thoughts about Live Action Role Play with encoded artefacts as an example of extended mind and possible future inter-dimensional information processing system. The talk goes along with two earlier talks Jason and I did on the work of Michael Mateas here. The feature image is [...]

This is a follow up to yesterday’s video reiterating my thoughts about Live Action Role Play with encoded artefacts as an example of extended mind and possible future inter-dimensional information processing system. The talk goes along with two earlier talks Jason and I did on the work of Michael Mateas here. The feature image is taken from Paul Pangaro’s online archive of Pask materials that is very much worth exploring here.

I am including a few maps if you want to poke around. All maps are best viewed on a laptop.

One features Pask’s cybernetic (an synesthetic) endeavors. Click here for the interactive version – enter “Pask” in the search barn top to the left if needed to zoom in again.

https://embed.kumu.io/1e710f6678f0a88ace5a8d3fae2e9af7#untitled-map?s=bm9kZS10bXlnWlROWQ%3D%3D

One shows Jacobo Moreno and Timothy Leary’s work in psychology and group dynamics through role play. Click here for the interactive version – enter “Moreno” in the search barn top to the left if needed to zoom in again.

https://embed.kumu.io/68e1cf46a34811b86499685100a83863#untitled-map?s=bm9kZS1zOW9nM0VjQg%3D%3D

One shows Mateas, LARPing, and non-traditional materials that compute. Click here for the interactive version – enter Mateas in the search barn top to the left if needed to zoom in again.

https://embed.kumu.io/174960fb41354356ac833be7f75f6fad#untitled-map?s=bm9kZS1YY1VlZ1hLeA%3D%3D

One shows distributed cognition with respect to context and encoded artifacts. Click here for the interactive version – enter “Distributed Cognition” in the search barn top to the left if needed to zoom in again.

https://embed.kumu.io/2a9737e61e74d617d28bfdf81d54a1cf#untitled-map?s=bm9kZS1OYUR5NHE4aQ%3D%3D

One shows DAO voting, which I believe relates to collapsing waves in Quantum Potential. Click here for the interactive version – enter “Extended Mind” in the search barn top to the left if needed to zoom in again.

https://embed.kumu.io/0932741381c995440ed1891fc8d992b7#untitled-map?s=bm9kZS1MckliZmRyTA%3D%3D

Enjoy!

 

 


Webistemology - John Wunderlich

Growing Democracy

There is a place, little noticed and even less understood by most Canadians, where democracy is growing stronger despite a history of violence and exploitation.
The People of DRCongo Shed Light on the “Heart of Darkness” as Our Media Looks the Other Way

Steve Soloman

Keeping up with world events, important as it is, can nonetheless be fraught. Any Canadian who wishes to stay informed has seen the coverage: autocratic governments flexing their muscles, personality cults rather than responsible governments and the rule of law being threatened even in well-established democracies. The internal rot of misguided populism and hyper partisanship, challenging as they are, are only the first steps along a very rocky road.

Despite what we see and hear, the news is not all bad. There is a place, little noticed and even less understood by most Canadians, where democracy is growing stronger despite a history of violence and exploitation.

When we think of Africa - if we think of it at all - we picture a continent struggling to overcome its colonial past. Tragically for the people who live there, this image is not entirely wrong; Africa has seen nine military coups since 2020. But like elsewhere youth in Africa are the continent’s hope, and Africa is a very young continent, with an average age in 2023 of just under nineteen. Education levels are rising though progress has been slow, due in part to a largely indifferent West. In the Democratic Republic of Congo (DRC), despite almost innumerable setbacks, positive strides are being made and there are valuable lessons to be learned if only we would take note. DRC and its people are working to overcome deplorable handicaps to create a government that is, to borrow a phrase, by the people and for the people.

When DRC does get mentioned, it’s because of either disease or warfare. This is largely due to the nature of the media beast; both what it is and what it isn’t. The media consists of profit-seeking businesses, and like any business it provides us with what it knows, or at least believes, we want. What it’s not is a pacifier ready to soothe our jangled nerves. Simply put, bad news sells. The news we get out of DRC is very much a case in point. There are positive developments, but we won’t read about this in mainstream media, not because of any sort of cover-up but rather out of rational business decisions. Thus democracy is evolving in the midst of a continent deserving of far more attention than it gets.

But before we can get to those positives we need to illustrate the circumstances out of which they have grown. This is really the only way we can appreciate what the people of DRC have suffered and continue to endure in their ongoing and heroic attempts to free themselves and achieve what so many of the rest of us take for granted.

DRC lies at the very centre of the African continent. With an area of 2.3 million square kilometres, it’s the second largest African nation after Algeria. It became a Belgian colony in 1908 but Europeans had ‘discovered’ the country well before that; in 1890 Joseph Conrad spent time there and later used it as the setting for Heart of Darkness. The book is a critique both of Belgian exploitation and an attitude toward Congo, and by extension all of Africa, that persists to this day.

Many of us continue to think of Africa as if it was one big country when in fact it contains fifty-four fully independent nations. Ethnically and culturally it’s at least as diverse as any other continent. In terms of its natural resources, DRC is amongst the wealthiest nations on Earth but its people are amongst the poorest. The Belgian colonizers exploited the country’s rubber reserves and more recently many nations, including Canada, have taken advantage of DRC’s vast quantities of copper, cobalt, zinc, silver, gold, bauxite, uranium and coltan. In all, minerals account for 90 per cent of DRC’s exports. To illustrate just one example, eighty per cent of the world’s supply of coltan comes from DRC and that mineral is in all the cell phones and laptops you and I use every day.

Much of the mining in DRC is referred-to as ‘artisanal’, a euphemism which when put into plain English, means men and children, typically boys, working as miners with no safety gear and little or no equipment of any kind beyond pickaxes. The coltan in our phones and computers has very likely come from one of these ‘artisanal’ mining operations. This is in no way meant to suggest we shouldn’t own these things, only that we should be aware; that we should be ready to take positive steps to give back in some way; to end the exploitation.

DRC officially gained its independence from Belgium on June 30th 1960. But the country was utterly unprepared to run its own affairs since the Belgians had taken no steps to prepare their former colonials for the challenges of self-rule. A republican government was established, with both a President and Prime Minister. Patrice Lumumba, a leader of the independence movement, and the country’s first Prime Minister, was both an African nationalist and a member of the pan-African movement. This meant he supported national self-determination and believed in strengthening bonds between all indigenous Africans and the global African diaspora. He played a major role in taking the nation from colony to independence. But his left-of-centre political views, in the midst of the Cold War, made him dangerous in the eyes of several western nations, particularly the United States.

The independence celebrations were short-lived; within a very few days the new nation was faced with what came to be known as the Congo Crisis. With Belgian support the provinces of Katanga and South Kasai seceded and there was also a revolt by members of the military as Black soldiers were no longer willing to accept orders from white officers. The United Nations was preparing to send troops to aid the government against the secessionists but the Secretary-General, Dag Hammarskjold, made a last minute decision not to do so. In response, Lumumba called for assistance from the Soviet Union, which sent ‘military advisors’. The Soviet presence caused a split in the government between Lumumba and the President, Joseph Kasa-Vubu. It was at this point that Joseph-Désiré Mobutu Sese-Seko, a lieutenant-colonel and Lumumba’s chief military advisor, stepped in to break the deadlock by leading a coup-d’etat. Supported by both Belgium and the United States, he expelled the Soviets and established a government that supported his view of Lumumba as a danger to the country. He led a second coup in 1965 that made himself President. About 100,000 people died during this period of political conflict, including Lumumba, who was assassinated on January 17, 1961. Mobutu ruled from 1965 to 1997. In 1971 he changed the country’s name to Zaire. His thirty-year rule also saw European investors expelled and the nationalizing of their companies. He looted the nation’s treasury. In 1990 he agreed to end the ban he had imposed on a multi-party state and formed a transitional government while retaining considerable political power. In 1994 he agreed to the appointment of Kengo Wa Dondo, an advocate for free-market reforms, as Prime Minister.

That same year in neighbouring Rwanda, between April and July, armed groups consisting of Hutu fighters committed genocide against the Tutsi people. Over 800,000 victims, mostly Tutsis, were killed and the violence spread into DRC as small groups of Hutu extremists formed militia groups. Such militias continue to operate in DRC to this day, funded largely by the Rwandan government under the leadership of Paul Kagame. Kagame, who is Tutsi, was a commander of a militia that sought, successfully, to put an end to the genocide. However he later initiated two rebel wars in DRC, the First Congo War, from 1996 to 1997, immediately followed by the Second Congo War of 1998 to 2003. Among horrific atrocities committed was the serial rape and murder of Congolese women. Canada’s Trudeau government, usually so ready to condemn such acts, has remained entirely silent about the continuing actions of the militia groups in DRC. As recently as July 13th of 2024, seventy-two people were killed by armed militia in a village about one hundred kilometres east of the nation’s capital, Kinshasa.

While the equally horrific acts occurring in Ukraine are breathlessly reported within hours, this slaughter in DRC was reported in a Toronto newspaper four days after the event and was buried at the bottom of page five.

Mineral wealth provides the incentive for the ongoing violence. Recent reports indicate that Rwanda’s national army, somewhat ironically named the Rwandan Defence Force, has deployed as many as four thousand soldiers to DRC. Their mission appears to be aiding the militia groups and facilitating the smuggling of minerals into Rwanda. In late January of this year, Rwanda sent even more troops into DRC, in numbers that indicated full-out invasion. Along with a militia group called M23, they captured the capital of DRC’s eastern region, Goma.

Since the 1990s Rwandan-backed militias have taken control of coltan and other mineral-mining operations. The Congolese government estimates that it loses $1 billion (U.S.) each year because of these illegal activities. The Congolese army is fighting to halt these operations but finds itself facing an enemy that is very well armed with modern weapons such as so-called mortar drones. Desertion is also a significant factor, as the militia groups pay their soldiers better wages than DRC can pay. People continue to be forced to flee their homes, a harsh reality in eastern DRC for almost thirty years. This violence has also resulted in severe food shortages as farms are abandoned in areas controlled by militia groups. The only realistic way to put an end to all this would be to confront the Rwandan government directly, with military force if needed. Why this has gone on all this time with no response from the West is a matter for conjecture, though it’s by no means far-fetched to suggest having access to relatively cheap minerals plays a role. A case can also be made that Western governments feel no pressure to act because their citizens are uninformed by media.

DRC has also been plagued by outbreaks of disease. In 1976 the country made headlines due to the outbreak of Ebola, a disease named after a tributary of the Congo River. The Ebola virus was first detected in a village about 110 kilometres from the river but it was decided to name the disease Ebola in order to avoid having the village become forever known as the starting point of this often - though not always - fatal pathogen. There have been subsequent outbreaks that have killed thousands of people. Work to create vaccines began to make progress in 2014. The World Health Organization did much to speed the process and an effective vaccine began to be used in 2016. Recent outbreaks have been quickly brought under control.

There are organizations in the West who lay claim to knowledge of the situation in DRC. Freedom House, a Washington D.C.- based non-profit that assesses how democratic various nations are, continues to list DRC as “not free”. However, a review of current trends suggests that the Freedom House ranking should be reviewed.

In January 2019, when Felix Tshisekedi became President, it marked the first time since independence that the presidency was peacefully transferred from one political party to another. Tshisekedi freed seven hundred political prisoners jailed by his predecessor. Understanding that education is vital to building a free and democratic state, he also invested heavily in schools for DRC’s next generation.

In December 2023 he faced another election, as the country’s constitution requires. Western media tended to focus on claims of voting irregularities that originated mostly with defeated candidates. Voter turnout was 48.8 per cent despite three provinces being unable to safely participate due to ongoing militia violence. That figure marks a small but important increase from the prior election in 2018 when 45.5 per cent of eligible voters cast a ballot (voter turnout in the Ontario election of 2022 was forty-three per cent). Tshisekedi was re-elected by a comfortable margin and reports from well-informed sources within DRC state that the majority of Congolais believe the election was run fairly, the results are credible and that the re-elected President had achieved some positive change that ordinary citizens could see for themselves. The really crucial point is this: if the majority of people in DRC see themselves as living in a democracy, how legitimate can it be for outsiders like Freedom House to claim otherwise?

DRC is just one of many countries that has had a long, hard struggle to achieve democracy, and the hard work of maintaining what has been won never stops. The people of that nation have overcome crushing obstacles, and the progress they’ve made continues to be under siege by those both in Africa and abroad who have very different interests.

Democracy doesn’t just happen by itself. It must be fought for and constantly supported by an informed and active electorate. The people of DRC have learned this vital lesson while too many of us in the West appear to have forgotten it.


Mike Jones: self-issued

Proposed Candidate Recommendation for Controlled Identifiers

The W3C Verifiable Credentials Working Group has published a Snapshot Candidate Recommendation of the Controlled Identifiers specification. This follows the five Candidate Recommendation Snapshots published by the working group in December 2024. Two of these specifications, including Securing Verifiable Credentials using JOSE and COSE, depend upon the Controlled Identifiers spec. The planned update

The W3C Verifiable Credentials Working Group has published a Snapshot Candidate Recommendation of the Controlled Identifiers specification. This follows the five Candidate Recommendation Snapshots published by the working group in December 2024. Two of these specifications, including Securing Verifiable Credentials using JOSE and COSE, depend upon the Controlled Identifiers spec. The planned update to the W3C DID specification also plans to take a dependency upon it.

A W3C Candidate Recommendation Snapshot is intended to become a W3C Candidate Recommendation after required review and approval steps.

Thanks to my co-editor Manu Sporny and working group chair Brent Zundel for their work enabling us to reach this point.


Simon Willison

o3-mini is really good at writing internal documentation

o3-mini is really good at writing internal documentation I wanted to refresh my knowledge of how the Datasette permissions system works today. I already have extensive hand-written documentation for that, but I thought it would be interesting to see if I could derive any insights from running an LLM against the codebase. o3-mini has an input limit of 200,000 tokens. I used LLM and my files-to-p

o3-mini is really good at writing internal documentation

I wanted to refresh my knowledge of how the Datasette permissions system works today. I already have extensive hand-written documentation for that, but I thought it would be interesting to see if I could derive any insights from running an LLM against the codebase.

o3-mini has an input limit of 200,000 tokens. I used LLM and my files-to-prompt tool to generate the documentation like this:

cd /tmp git clone https://github.com/simonw/datasette cd datasette files-to-prompt datasette -e py -c | \ llm -m o3-mini -s \ 'write extensive documentation for how the permissions system works, as markdown'

The files-to-prompt command is fed the datasette subdirectory, which contains just the source code for the application - omitting tests (in tests/) and documentation (in docs/).

The -e py option causes it to only include files with a .py extension - skipping all of the HTML and JavaScript files in that hierarchy.

The -c option causes it to output Claude's XML-ish format - a format that works great with other LLMs too.

You can see the output of that command in this Gist.

Then I pipe that result into LLM, requesting the o3-mini OpenAI model and passing the following system prompt:

write extensive documentation for how the permissions system works, as markdown

Specifically requesting Markdown is important.

The prompt used 99,348 input tokens and produced 3,118 output tokens (320 of those were invisible reasoning tokens). That's a cost of 12.3 cents.

Honestly, the results are fantastic. I had to double-check that I hadn't accidentally fed in the documentation by mistake.

(It's possible that the model is picking up additional information about Datasette in its training set, but I've seen similar high quality results from other, newer libraries so I don't think that's a significant factor.)

In this case I already had extensive written documentation of my own, but this was still a useful refresher to help confirm that the code matched my mental model of how everything works.

Documentation of project internals as a category is notorious for going out of date. Having tricks like this to derive usable how-it-works documentation from existing codebases in just a few seconds and at a cost of a few cents is wildly valuable.

Tags: llm, openai, o3, ai, llms, datasette, generative-ai, documentation, ai-assisted-programming, inference-scaling


Ambsheets: Spreadsheets for exploring scenarios

Ambsheets: Spreadsheets for exploring scenarios Delightful UI experiment by Alex Warth and Geoffrey Litt at Ink & Switch, exploring the idea of a spreadsheet with cells that can handle multiple values at once, which they call "amb" (for "ambiguous") values. A single sheet can then be used to model multiple scenarios. Here the cell for "Car" contains {500, 1200} and the cell for "Apartment"

Ambsheets: Spreadsheets for exploring scenarios

Delightful UI experiment by Alex Warth and Geoffrey Litt at Ink & Switch, exploring the idea of a spreadsheet with cells that can handle multiple values at once, which they call "amb" (for "ambiguous") values. A single sheet can then be used to model multiple scenarios.

Here the cell for "Car" contains {500, 1200} and the cell for "Apartment" contains {2800, 3700, 5500}, resulting in a "Total" cell with six different values. Hovering over a calculated highlights its source values and a side panel shows a table of calculated results against those different combinations.

Always interesting to see neat ideas like this presented on top of UIs that haven't had a significant upgrade in a very long time.

Via Hacker News

Tags: spreadsheets, geoffrey-litt, ui, ux


AI-generated slop is already in your public library

AI-generated slop is already in your public library US libraries that use the Hoopla system to offer ebooks to their patrons sign agreements where they pay a license fee for anything selected by one of their members that's in the Hoopla catalog. The Hoopla catalog is increasingly filling up with junk AI slop ebooks like "Fatty Liver Diet Cookbook: 2000 Days of Simple and Flavorful Recipes for a

AI-generated slop is already in your public library

US libraries that use the Hoopla system to offer ebooks to their patrons sign agreements where they pay a license fee for anything selected by one of their members that's in the Hoopla catalog.

The Hoopla catalog is increasingly filling up with junk AI slop ebooks like "Fatty Liver Diet Cookbook: 2000 Days of Simple and Flavorful Recipes for a Revitalized Liver", which then cost libraries money if someone checks them out.

Apparently librarians already have a term for this kind of low-quality, low effort content that predates it being written by LLMs: vendor slurry.

Libraries stand against censorship, making this a difficult issue to address through removing those listings.

Sarah Lamdan, deputy director of the American Library Association says:

If library visitors choose to read AI eBooks, they should do so with the knowledge that the books are AI-generated.

Via Emily Bell

Tags: slop, ai, ethics, libraries

Tuesday, 04. February 2025

The Pragmatic Engineer

Cross-platform mobile development with Expo

Expo has quietly become one of the most popular tools for cross-platform development. Why is this, and how does Expo work? A deepdive with the Expo engineering team

React Native and Flutter are by far the most popular cross-platform development technologies, as previously covered in the deepdive, Cross-platform mobile development. React Native (made by Meta) seems more popular in the US and UK, and at mid to large-sized companies, while Flutter (made by Google) powers more apps overall, globally.

But there’s also one other company that consistently comes up in talk about cross-platform mobile technologies: Expo. When the Bluesky team shared their cross-platform tech stack, they mentioned that it was React Native and Expo. Meanwhile, the React Native “getting started” guide strongly advises starting development with Expo, and calls it “a production-grade React Native Framework.”

So, what is Expo and why is it so important for cross-platform React Native development?

A year ago, I travelled to California and visited Expo’s offices in Palo Alto, meeting with the team to find out more; a few months later, I got back in touch for extra details on how Expo works, and to learn what makes it popular. This deepdive covers:

Why is Expo popular? It played a large role making React Native as widespread as it is today, and its developer focus has been a big factor.

History. Expo began in dissatisfaction about the clunkiness of developing and shipping mobile apps. Today, a mission to make mobile development as seamless as web dev still motivates the team.

React Native vs a React Native framework. Expo is a React Native framework, and the only production-ready one, to date.

Expo: developer tools. Overview of tools Expo offers as open source, for free.

Shipping to production with EAS. Expo generates revenue with its Expo Application Services (EAS): a freemium remote build and submission service. An overview of its wide-ranging capabilities.

Alternatives for shipping cross-platform apps. Ionic Appflow, Shoebird, Fastlane, Bitrise, Codemagic.

This deepdive features contributions from Expo’s co-founder and CEO Charlie Cheever, co-founder and CTO James Ide, and engineering manager Brent Vatne. Their input is appreciated!

As with every deepdive we publish, The Pragmatic Engineer has no commercial affiliation with the company featured, and was not paid to write about them in this article. More in our ethics statement.

1. Why is Expo popular?

Expo is a startup based in Palo Alto, California, employing 32 people, 29 of whom are developers – a surprisingly high ratio of 90%. The company lists employees on its about page. The ratio at larger software companies like Meta, Google, or Microsoft is rarely above 30-40%, due to the presence of other teams like sales, support, and many other support functions.

Today, the open source Expo framework is used in more than 1 million public Github repositories, and has more than 800,000 downloads per week. The project is very active: more than 1,300 developers contribute in total, and there were more than 50,000 members of the Discord channel at time of publication.

Expo may be the biggest reason why React Native became as popular as Flutter. These days, when I hear a company develops with React Native, it almost always follows that they use Expo, too. This is because it has developer tools which make even the best cross-platform framework much less clunky to develop on for the iOS and Android native platforms.

For Flutter, similarly solid developer tooling which Google built and maintained has long been a differentiator; the search giant built sophisticated tools to debug, profile and diagnose Flutter applications. However, getting started with Flutter still requires a multi-step developer environment setup, while shipping iOS and Android apps is a pretty involved process, compared with the simplest ways of getting started with React Native and Expo:

Just open the website snack.expo.dev.

This is the site called “Expo Snack,” where you can immediately start to do live editing on a React Native application that runs on an Android emulator, an iOS emulator, or a web view:

An app built in two minutes without installing anything, running on a remote iOS simulator. Image: Expo Snack

You can also run the app on your mobile device by scanning a QR code and installing the Expo Go app. I also did this – and the app live updated as I made changes. With such little effort required, this felt magical.

A React Native app running on my phone as a native app, after a few minutes of coding and zero dev environment setup

Being able to live edit an app with zero development tooling feels magical, even in 2025. Developing with no tools installed locally is not possible when doing native iOS or Android development. Google’s cloud development environment, Project IDX, comes close, but it’s not as snappy. Meanwhile, Expo Snack is just one of many developer-first features produced by Expo’s small team, that’s on a par with Apple and Google tools. More below on Expo’s development tooling in the sections, “What is Expo?” and “Shipping to production.”

Why do companies move to Expo? We asked the Bluesky engineering team, who are heavy React Native users – and whom we previously covered in the deepdive Inside Bluesky’s engineering culture. Here’s what Paul Frazee – the dev who built the initial Bluesky’s iOS, Android, and web applications, using a single codebase – told us:

“We were initially manually building the app using Xcode and Android Studio, then uploading the builds.

The reason we first looked at Expo was to help us with deployments. Expo has a really solid cloud-build infrastructure (EAS Build) and over-the-air update system (EAS Update). We looked at the other React Native cloud build services and none of them seemed as well built, so we took a chance with Expo. We found ourselves iteratively adopting expo modules, and then moved fully into their framework. My only regret is that we didn’t start with it. It’s not often that I have such a positive experience.

We started migrating over to Expo around 9 months into app development, around February 2023. This was when we had a pretty mature app. It was an iterative migration that went pretty smoothly.”

2. History

As previously mentioned, Expo was founded out of frustration at how long it takes to build a mobile app. In 2012, Charlie Cheever was CTO at Quora and working on an iOS and Android app for the Q&A site. Being a hands-on developer with extensive web experience (he was an early engineer at Facebook), he assumed it would take at most a few weeks to build each native app. However, it actually took months per platform, and included terrible developer experiences on both iOS and Android; at least, compared to the web. From this came the idea for Expo. Charlie sums up the objective:

“The web is a pretty good way of doing development and it’s so powerful. Let’s take everything that’s good about the web and web development and make the mobile development space better.”

He teamed up with James Ide and they started experimenting with ways of using web technologies to build mobile apps, eventually ending up with a framework that wrapped mobile-native components; basically something pretty similar to React Native. They were about to launch when React Native was released, which was created and used by Meta, with around 40 people working on it. In contrast, the as yet-unreleased Expo framework was developed by two people.

Rather than compete with React Native, Expo decided to embrace it. Charlie and James understood that coding an app was just one of the many parts of shipping a cross-platform app. Every developer using React Native still had other problem areas to solve:

Distribution to the iOS and Android App Stores

Release strategies

CI pipelines

Improving the developer experience

“Exponent” was the first product the team shipped; a React Native development tool that sat a level above React Native. The team announced it in 2015 at a React conference called React Rally. It took care of things like:

Dealing with Xcode and Android Studio

Provisioning profiles for iOS

Development and deployment certificates

Any Objective-C, Swift and Java-specific things

Sketch of the explanation used to introduce Exponent in 2015

The Exponent toolset kept evolving, and two years later in 2017, the name changed to Expo because it’s easier to say and remember. From 2017, Expo kept shipping new, major releases to Expo SDK several times per year. Back then, Expo’s SDK was on version 21; today, it’s on version 52. The company maintains a changelog listing notable changes, and a detailed changelog.

3. React Native vs a React Native Framework

Expo is a framework and set of tools that uses React Native (RN), and simplifies the development of RN applications. It also happens to be the only React Native Framework considered as production-grade, currently. But what is a “React Native Framework?” As React Native builds on top of React, let’s see how things work in the React world.

React vs React Frameworks

React: providing core capabilities. React is a JavaScript library for building web user interfaces.

React code using the markup called JSX, a JavaScript syntax extension popularized by React which supports HTML-like rendering logic. Source: React

React takes care of many things, like:

High performance: using a Virtual DOM, React creates an in-memory data structure cache of the UI, computes the resulting differences, and updates the browser’s DOM only as needed. This process is called reconciliation and produces better performance

JSX: support for the JSX syntax extension to allow using HTML-like code within JavaScript

Reusable UI components: the core of React is reusable components. React specifies how to define components, their lifecycle events, nesting, communicating between them, rendering differently based on different conditions, and more

Handling events like clicking, hovering, keyboard inputs, swiping, etc.

UI state management: an opinionated way to manage state. Instead of manipulating individual parts of the UI, React uses a declarative approach

Other features like support for TypeScript, React Hooks (using React features from components), and support for server components, among others.

The simplest React component. The React framework specifies how to create these, and has support for even complex use cases for components. Source: React

React Frameworks: providing production-grade capabilities. You can build web applications only using React. However, the more complex and larger an application gets, the more additional features must be built, like routing between pages, code-splitting between several files, fetching data, moving some rendering to the server, and so on. Here’s what the React team says about frameworks in the getting started guide:

“You can use React without a framework, however we’ve found that most apps and sites eventually build solutions to common problems such as code-splitting, routing, data fetching, and generating HTML. These problems are common to all UI libraries, not just React.

By starting with a framework, you can get started with React quickly, and avoid essentially building your own framework later.”

The React team lists three “production-grade” frameworks, defined by:

Support for all features needed to deploy and scale apps in production

Open source

Can be deployed to a personal server or a hosting provider

React Frameworks which meet these conditions, and are recommended by the React team:

Next.js: the Pages Router of Next.js is a full-stack React framework. It’s versatile and lets you create React apps of any size, from a mostly static blog, to a complex dynamic application. Maintained by Vercel.

Remix: a full-stack React framework with nested routing. It lets you break an app into nested parts that can load data in parallel and refresh in response to user actions. Maintained by Shopify.

Gatsby: a React framework for fast CMS-backed websites. Its rich plugin ecosystem and GraphQL data layer simplify integrating content, APIs, and services into one website. Maintained by Netlify.

React is funded by Meta, but React frameworks are funded by other companies. Vercel and Netlify are hosting providers and fund the frameworks as it helps drive adoption of their services. Remix was acquired by Shopify, and is being merged into React Router.

React Native vs a React Native Framework

Considering the differences between React and React Frameworks, it’s likely to be unsurprising that React Native has a similar concept split between “core” React Native features, and production-ready features which frameworks should provide.

React Native offers core APIs and capabilities to build native apps. It’s a framework that allows using the React programming paradigm to build native iOS and Android applications, which offers:

A runtime for JavaScript and the React syntax, with the ability to augment it using native iOS and Android extensions

Similar-enough performance to native-only applications

Continual support for modern React features like Suspense (declaratively specifying the loading part of a component tree), Transitions (distinguishing between urgent and non-urgent updates), automatic batching (grouping multiple re-renders into a single re-render for better performance) and others

APIs to invoke native iOS or Android APIs

Hot reloading: during development, see changes made in the code update on the emulator or device in around a second

React Native frameworks provide production-grade capability: The React Native team follows an RFC approach for discussions and proposals. In 2024, the team opened an RFC for React Native frameworks and arrived at the following definition of a RN framework:

“Shipping native apps to production usually requires a set of tools & libraries that are not provided by default as part of React Native, but are still crucial to hit the ship to production. Examples of such tools are: support for publishing applications to a dedicated store, or support for routing and navigation mechanisms.

When those tools & libraries are collected to form a cohesive framework built on top of React Native, we call this a React Native Framework.

A practical example of bespoke React Native Framework is how Meta uses React Native internally. We do have a collection of libraries, scripts and tools that make the integration of React Native easier with the various apps where it's used.”

Expo: the only production-grade open source RN framework available today. At the time of publishing, the React Native team only recommends Expo as a production-grade framework. This is a very strong recommendation, given that the same team also writes this about React Native frameworks:

“You’re either using a React Native Framework or you’re building your own React Native Framework”

So how did Meta end up recommending Expo? Charlie explains:

“I’d clarify the recommendation a tiny bit: the Meta team’s guidance about React Native is that you’re going to need to use some framework with it to build anything real. If you don’t choose an off the shelf one, you’re going to end up having to build one yourself.

Today, Expo is the only very mature React Native framework. However, if tomorrow another team comes along and builds another really good React Native framework, everyone would welcome this.”

Collaboration with Meta started early, as Brent Vatne, engineering manager at Expo, recalls:

“A few of us have been contributors to React Native since the earliest days, the initial preview release at React Conf 2015. We’ve demonstrated through our involvement for nearly 10 years that we are deeply invested in the success of React Native, and can be relied on to collaborate on everything from conference talks to some of the largest initiatives on the open source side of the project.

For example, over the past year we have been working closely with the React Native team at Meta on getting the New Architecture for React Native ready to roll out to open source. We helped prepare the ecosystem by migrating all of our tooling at Expo, using dependency statistics to determine the most impactful third party libraries and helping to migrate them, reporting and/or fixing related issues that we encounter in React Native, educating the community, and many other projects that come out of rolling out such a significant change.”

Expo seems to fill a gap in a way that helps Meta, by making React Native more accessible for external developers. Charlie:

“Meta’s focus is mostly about making React Native work great inside Meta, and ours is to make it work great outside of Meta. Meta doesn’t directly benefit from making React Native open source and most of their team’s focus is on making it work really well for them. So there’s a natural way that we’re able to fit together in a way that everyone wins!”

React Native by itself does not support tools necessary to deploy and scale an app that is production-grade. Meta has its own production-grade React Native framework, which is tailored to its needs and its vast number of custom internal tools. So it’s a win for Meta to have a company building a more generic production framework to build React Native apps with.

4. Expo: collection of developer tools

Expo makes it easier to build production-grade React Native apps by providing additional abstractions (like routing) and tools (like a command line) to make building apps faster. It brings these added features to React Native development, built on top of React Native:

Read more


Patrick Breyer

Halbguter neuer polnischer Vorschlag zur Chatkontrolle wird am Mittwoch diskutiert

Polen, das derzeit den Vorsitz im EU-Rat innehat, schlägt eine wichtige Änderung des viel kritisierten EU-Vorschlags zur Chatkontrolle vor: Anstatt die generelle Durchsuchung privater Chats anzuordnen soll die Chatkontrolle wie …

Polen, das derzeit den Vorsitz im EU-Rat innehat, schlägt eine wichtige Änderung des viel kritisierten EU-Vorschlags zur Chatkontrolle vor: Anstatt die generelle Durchsuchung privater Chats anzuordnen soll die Chatkontrolle wie bisher im Ermessen der Anbieter stehen. Vertreter der EU-Regierungen werden den Vorschlag in der EU-Arbeitsgruppe für Strafverfolgung am Mittwoch beraten.

“Der neue Vorschlag ist ein Durchbruch und im Kampf um unser digitales Briefgeheimnis ein großer Sprung nach vorn”, kommentiert Patrick Breyer (Piratenpartei), ehemaliges Mitglied des Europäischen Parlaments und digitaler Freiheitskämpfer. “Der Vorschlag würde sichere Verschlüsselung schützen und damit die Sicherheit unserer Smartphones. Allerdings blieben drei grundlegende Probleme ungelöst:

1. Massenüberwachung: Selbst wenn Anbieter wie Meta, Microsoft oder Google die Chatkontrolle “freiwillig” praktizieren, ist sie immer noch eine völlig ungezielte und wahllose Massenüberwachung aller privaten Nachrichten über diese Dienste. Nach Angaben der EU-Kommission sind etwa 75 % der Millionen privater Chats, Fotos und Videos, die jedes Jahr von den unzuverlässigen Chatkontrollalgorithmen der Industrie geleakt werden, nicht strafrechtlich relevant und lassen unsere intime Kommunikation in die Hände Unbekannter gelangen, bei denen sie nicht sicher ist und bei denen sie nichts zu suchen hat. Eine ehemalige Richterin des Europäischen Gerichtshofs, Ninon Colneric (S. 34 f.), und der Europäische Datenschutzbeauftragte (Abs. 11) haben gewarnt, dass diese wahllose Überwachung gegen unsere Grundrechte verstößt, selbst wenn sie im Ermessen der Anbieter liegt. In Schleswig-Holstein und Bayern sind bereits zwei Klagen gegen diese Praxis anhängig.

Das Europäische Parlament schlägt einen anderen Ansatz vor: Die Telekommunikationsüberwachung soll verpflichtend angeordnet werden können, aber auf Personen oder Gruppen beschränkt werden, die mit sexuellem Kindesmissbrauch in Verbindung stehen. Das Parlament schlägt außerdem vor, dass die Anbieter ihre Dienste durch eine Reihe von Voreinstellungen, Nachfragen und Warnungen sicherer für junge Menschen gestalten müssen.

2. Digitaler Hausarrest: Nach dem von Polen unverändert vorgeschlagenen Artikel 6 könnten Nutzer unter 16 Jahren künftig zu ihrem eigenen Schutz vor sexueller Annäherung alltägliche Apps aus dem App-Store nicht mehr installieren. Dazu gehören Messenger-Apps wie Whatsapp, Snapchat, Telegram oder Twitter, Social-Media-Apps wie Instagram, TikTok oder Facebook, Spiele wie FIFA, Minecraft, GTA, Call of Duty, Roblox, Dating-Apps, Videokonferenz-Apps wie Zoom, Skype, Facetime. Ein solches Mindestalter wäre leicht zu umgehen und würde Jugendliche bevormunden und isolieren, anstatt sie zu stärken.

3. Verbot anonymer Kommunikation: Nach dem von Polen unverändert vorgeschlagenen Artikel 4 (3) wäre es Nutzern künftig nicht mehr möglich, anonyme E-Mail- oder Messenger-Konten einzurichten oder anonym zu chatten, ohne einen Ausweis oder ihr Gesicht vorzeigen zu müssen, wodurch sie identifizierbar würden und das Risiko von Datenlecks entstünde. Dies würde z. B. sensible Chats zum Thema Sexualität, anonyme Pressekommunikation mit Quellen (z. B. Whistleblowern) sowie politische Aktivitäten einschränken.

Alles in allem ist der polnische Vorschlag im Vergleich zu den bisherigen Texten ein großer Fortschritt in Bezug auf unsere Sicherheit im Internet, aber er erfordert noch gravierende Nachbesserungen. Gleichzeitig geht der Vorschlag wahrscheinlich schon zu weit für die Hardliner-Mehrheit der EU-Regierungen und die EU-Kommission, deren Überwachungshunger bisher stets so extrem war, dass sie die Opfer lieber ohne Einigung ganz im Stich lassen als eine verhältnismäßige, gerichtsfeste und politisch mehrheitsfähige Alternative zur Chatkontrolle zu akzeptieren.”

Monday, 03. February 2025

Doc Searls Weblog

A Hat Tip to United

United Airlines details 6 big inflight entertainment updates, including all-new Control Tower map, by Zach Griff in The Points Guy, is thick with welcome news for frequent United fliers, of which my wife and I are two. (So far I have clocked 1,533,214 miles with United, and she has about double that. We are also […]
The location of just one United Club at O’Hare (ORD), one of United’s main hubs, through which I have transited countless times.

United Airlines details 6 big inflight entertainment updates, including all-new Control Tower map, by Zach Griff in The Points Guy, is thick with welcome news for frequent United fliers, of which my wife and I are two. (So far I have clocked 1,533,214 miles with United, and she has about double that. We are also both lifetime members of the United Club, thanks to her wise investment in a sweet deal offered by United decades ago—and withdrawn quickly after that.)

We are also both T-Mobile customers, which is why seeing this on my phone’s United app is always welcome:

It mostly works. Yes, it’s slow, but it is possible to get work done at altitude at no extra cost. Very nice.

Here’s the rundown of new stuff from United, according to Zach:

New 4K seatback screens “Bluetooth connectivity at every seat, making it possible to pair wireless headphones, including AirPods, with the entertainment systems.” Control Tower View: “This view allows you to pull up a map of the airfield that’s overlaid with all the aircraft around you. Clicking on each little plane brings up its call sign and operating airline… powered by the flight deck’s navigation systems and a live feed of planes from FlightAware.” Starlink is coming. This will be a huge boost in bandwidth for passengers connecting to the Net on flights. Channel 9 (now called “From the Flight Deck”) is still there.

Here is what that last item looked like, the last time I saw the option and shot it on a plane:

Two problems with this. First, it’s buried deep among entertainment options (Zach says it’s under the Audio tab). Second, most, if not all, pilots don’t bother with it. Back in the primitive Channel 9 days, more than half of United pilots turned it on (or left it on, if it was there by default). Or at least that was my experience. Zach:

That said, in recent years, United’s aviation enthusiast customers have complained that Channel 9 hasn’t been working. According to Green, the functionality is still very much available — it’s just that more and more pilots are choosing not to enable the feed.

“Pilots can turn it off if they don’t want people to hear whatever chatter is going on,” Green explained. All hope isn’t lost, though. “We know it’s a cool feature,” Green added. “We have it enabled as much as we can.” (That’s Dominic Green, United’s director of inflight entertainment.)

I suggest that United urge their pilots a bit more forcefully to turn the feature on. Fellow pilots and aviation buffs love having it there. And people afraid of flying also find it comforting to hear pilots sounding totally calm while flying through turbulence.

One more thing. While it would be nice to screen-share the seat-back screen from your own device, there’s this:

Extended displays aren’t coming soon

As more travelers bring their own tablets and laptops on board, I’ve always wondered why airlines don’t offer a screencasting feature on the entertainment screens. After all, it’s a lot easier to get work done with some additional screen real estate.

Turns out, United can already technically enable screencasting today, Green said, but a major issue will likely mean that flyers will never see this functionality.

“We’ve had a lot of pushback from our corporate partners that say they don’t necessarily want their staff using publicly available screens,” Green said.

It’s not that United would have access to any data; it’s that they don’t want nosy passengers snooping in on their neighbors.

Makes sense. But I think United could partner with Apple and Google to create Apple PlanePlay and Google Plane (or whatever names they want to come up with), so at least some personal apps could extend onto the seatback.

Anyway, progress.

 

 

 

 

 


Wrench in the Gears

Alison Reflects on Joseph Gonzalez’s Theory of Quantum Realism – A Hopeful Participatory Universe Built On Love!

Below are Joseph Gonzalez’s responses to questions I posed about his theory of quantum realism. You can find out more at his blog bantamjoe.com. I discuss these questions in the video below starting at timestamp 20 minutes. Select links from Bantamjoe.com: The Self-Aware Circle of Consciousness: Here A Holographic Reality Designed By Consciousness, Designed For [...]

Below are Joseph Gonzalez’s responses to questions I posed about his theory of quantum realism. You can find out more at his blog bantamjoe.com. I discuss these questions in the video below starting at timestamp 20 minutes.

Select links from Bantamjoe.com:

The Self-Aware Circle of Consciousness: Here

A Holographic Reality Designed By Consciousness, Designed For You!: Here

Fractal Dimensions of Consciousness: Here

Love, The First Action of Consciousness: Here

Consciousness From Microtubules to Brain Waves: Here

Simulation Theory Vs. Quantum Realism: Here

Link to Heart Forgiveness website.

Elevator Pitch for Quantum Realism

Quantum Realism proposes that the physical universe is not fundamental but instead a virtual construct generated by a self-sustaining quantum network or primal consciousness. The physical phenomena we observe, including space, time, energy and matter, are outputs of this underlying quantum process, more like a computational system where the quantum field serves as the substrate for reality. Unlike classical realism, which treats matter as independent and static, Quantum Realism views the universe as a dynamic, evolving system, continuously shaped by observation and interaction.

This theory aligns with the strange findings of modern physics, such as quantum superposition, entanglement, and the observer effect. These phenomena indicate that reality behaves more like information being processed than a collection of static objects. By grounding itself in the principles of quantum mechanics and information theory, Quantum Realism provides a framework that explains physical laws but also integrates consciousness as an active participant in the unfolding of reality. 

How Quantum Realism Differs from Other Theories

Quantum Realism stands apart by uniting consciousness and matter within a single quantum substrate. Classical physics focuses on deterministic interactions of matter, while dualism separates consciousness from the material. Quantum Realism suggests that matter emerges from the consciousness field, which acts as a self-generative, non-physical substrate. This explains phenomena like wave-particle duality and the observer effect, where the act of measurement collapses probabilities into specific outcomes.

In contrast to other simulation theories, which claim an external programmer, Quantum Realism describes a holographic reality that is self-generating, requiring no external creator. The consciousness quantum network acts as both the origin and sustainer of reality, dynamically evolving through recursive feedback loops. By embedding consciousness within this process, Quantum Realism resolves the paradox of how non-physical awareness can influence a seemingly physical world, offering a more integrated perspective than either dualism or materialism.

What Led You to This Investigation?

Stemming from my childhood curiosity of electricity and of light, I started learning the math that was required. It was the whole concept of imaginary numbers that got me questioning reality. 

The idea that light oscillates into a imaginary 4th dimension emerged from the mathematical framework of quantum mechanics. I later discovered Imaginary numbers are fundamental to describing oscillatory behavior in wavefunctions, suggesting that light and other quantum phenomena extend beyond the three spatial dimensions we perceive. This mathematical insight led me to consider whether these higher-dimensional oscillations underpin the strange behaviors observed in quantum systems, such as superposition and entanglement.

For me this opened a pathway to investigate how higher-dimensional processes might generate the physical universe as a lower-dimensional projection. By focusing on the recursive nature of these oscillations, I began exploring how reality could arise from iterative feedback within a quantum network. This exploration ties into Quantum Realism’s premise that space, time, and matter are emergent constructs, projected from the recursive operations of the quantum field.

The Circle of Values

Everything in the universe oscillates (light waves, matter waves, and even biological rhythms) indicating an underlying recursive principle. This principle, that I refer to as the “Circle of Values,” describes how primal consciousness perpetuates creation through cyclic processes. Each oscillation represents a feedback loop in which information from the quantum field interacts with localized nodes, generating structure and coherence across scales. These cycles are fractal-like, with self-similar patterns appearing at every level of reality, from quantum fluctuations to galactic rotations.

This recursive behavior mirrors the properties of fractal mathematics, where complexity arises from simple iterative rules. In Quantum Realism, the Circle of Values represents consciousness in action, continuously manifesting and sustaining the fabric of reality. By oscillating through states, this process generates not only physical structures but also the informational coherence necessary for life and awareness to emerge, illustrating the very deep interconnection between consciousness and the material world.

Holographic Reality vs. Simulations

A holographic reality differs fundamentally from a simulation in that it requires no external programmer or hardware. Instead, it emerges intrinsically from within the quantum field itself, with every fractal part containing information about the whole. This self-generative nature is supported by quantum entanglement, where particles separated by vast distances remain instantaneously correlated. Such behavior suggests that reality operates like a hologram, where local phenomena reflect an interconnected structure.

In contrast to simulations, which rely on predefined algorithms and external input, a holographic reality evolves dynamically through feedback between consciousness agents and the quantum network. This perspective resolves the apparent separation between observer and observed, as both are integrated within the same system. Quantum Realism states that the universe is not a static construct but a living, self-referential system that adapts and evolves as consciousness interacts with it.

Free Will: Participants or Puppets?

Quantum Realism portrays localized consciousness as an active participant in shaping reality. While physical parameters provide constraints (such as natural laws and probabilities) free will emerges as consciousness influences the collapse of quantum states. The observer effect demonstrates this participatory role, where the act of measurement determines which potential becomes reality. Thus, consciousness is not merely a bystander but an integral component of the quantum network.

This dynamic allows for meaningful choice within the parameters of the system. While deterministic factors like genetics and environment play a role, the ability of consciousness to interact with the quantum field introduces variability and agency. In this way, Quantum Realism reconciles the apparent tension between determinism and free will, framing individuals as co-creators within an evolving reality.

What Is Quantization?

Quantization is the process by which continuous possibilities are restricted to discrete units, such as energy levels in an atom. This principle is essential for the stability of physical systems, as it prevents infinite regress and ensures coherence. Without quantization, systems would lack the precision needed for consistent behavior, leading to paradoxes like infinite energy densities in classical physics.

In Quantum Realism, quantization also reflects the underlying processing structure of the quantum network. By discretizing energy, time, and space, the system ensures that interactions remain finite and manageable, enabling the emergence of stable structures like atoms and molecules. This discrete framework not only resolves the infinities problem but also provides a foundation for understanding how coherence and order arise in a fundamentally quantum reality.

Time, Causality, and Superposition

In Quantum Realism, time is not an absolute backdrop but an emergent property of processing cycles within the quantum field. Each cycle represents a discrete step in the evolution of reality, giving rise to the ordered flow of events we perceive as time. Superposition, where particles exist in multiple states simultaneously, reflects the quantum field’s ability to hold and process many potentials before they are collapsed into specific outcomes.

Causality emerges from this collapse, as interactions within the quantum network resolve probabilities into ordered sequences. This dynamic interplay between potential and actualization creates the linear progression we experience, while superposition ensures that the system retains flexibility and adaptability. Together, these principles demonstrate how time, causality, and quantum phenomena are deeply interconnected within the framework of Quantum Realism.

The Role of Our 3D Bodies

Our 3D bodies serve as localized nodes within the quantum network, enabling consciousness to interact with the virtual constructs of space and time. By acting as receivers and processors of quantum information, these bodies provide the specificity and coherence needed for complex interactions, such as perception, learning, and decision-making. This localized embodiment allows consciousness to experience and express reality in a focused and constrained way, facilitating exploration and growth.

At the quantum level, our bodies are composed of informational systems governed by quantized interactions, such as atomic vibrations and molecular bonds. These interactions provide the stability necessary for biological processes, while also linking us to the larger quantum network. This dual role (as both physical entities and conduits for consciousness) illustrates the magnificent integration of body, mind, and the quantum substrate.

Reflections on Itzhak Bentov’s Premise

Though admittedly I don’t know much about Bentov, his idea that life represents organized information gifted back to the cosmos aligns with Quantum Realism’s view of consciousness as a dynamic contributor to the quantum field. Each life accumulates unique experiences, which are reintegrated into the system upon death, enriching its informational density and coherence. This cyclical process mirrors the conservation of energy and information observed in physical systems.

By framing life as an exchange of information between localized consciousness and the quantum network, Quantum Realism provides a holistic view of existence. Death is not an end but a transition, where individual contributions are folded back into the universal substrate, furthering the evolution of the system as a whole. This perspective offers both a scientific, existential and spiritual understanding of life’s purpose and continuity.

Hope in Navigating 3D Reality

Quantum Realism offers a hopeful perspective by framing life as an integral part of a coherent, meaningful process. By recognizing that consciousness actively shapes reality, individuals can embrace their role as co-creators within this evolving system. This participatory view inspires purpose and creativity, transforming challenges into opportunities for growth and contribution.

The recursive and interconnected nature of the quantum network suggests that even small actions can have far-reaching effects. This reinforces the idea that every individual’s choices matter, contributing to the larger process of coherence and complexity. In this way, Quantum Realism not only explains the nature of reality but also provides a framework for navigating it with intention and hope.


Talking Identity

The Call Is About To Come From Inside The House

You would have to be living under a rock to have missed all the talk about Agentic AI, and how it is going to revolutionize the way we live and work. AI-powered agents will be anything and everything – from personal shopper to travel concierge, executive assistant to inventory manager, medical diagnostician to customer service […]

You would have to be living under a rock to have missed all the talk about Agentic AI, and how it is going to revolutionize the way we live and work. AI-powered agents will be anything and everything – from personal shopper to travel concierge, executive assistant to inventory manager, medical diagnostician to customer service representative, software developer to security pentester. Article after article is devoted to both the opportunities and the risks. And when it comes to risk, all of us working in the Digital Identity space are not prepared for what is coming.

Photo by Growtika on Unsplash

In the wake of OpenAI releasing Operator, a Computer-Using Agent (CUA), in research preview, I’ve read many breathless posts about the future of Web-based Agentic AI (as opposed to API-based Agentic AI), and how it makes every website “programmable”, even without APIs. If you have worked in software development, you can visualize the mechanics easily – it’s like giving a QA Automation tool like Selenium WebDriver a brain, so that instead of just automating web applications for rinse-and-repeat testing, it can actually read the data, make decisions, adjust course, and take action. That framing should also make it easy to immediately grok how this will break the identity and security infrastructure we currently have, or are putting in place. I mean, we have been dealing with these in our QA Automation projects forever. I thought I’d share the thoughts that immediately jumped to my mind, mostly because I need to not be the only one worrying about these (#MiseryLovesCompany).

1) Bypassing/Breaking/Compromising Authentication Mechanisms

Since CUAs rely on web-based browsing, they necessarily run into some of the same break points that QA automation runs into – like multi factor authentication, bot verification techniques, and more. Any CUA would currently have to give the user back control of the browser to take these actions before proceeding. This high friction point is going to run head first into consumer dissatisfaction and business mandates to “just make it work”, and all of us in identity can guess exactly what will follow:

Users will hand over passwords to their Agent service so it can log in as them, or grant them access to their password managers (probably as a feature getting built into first the browser password manager and then the generic password managers). Users will turn off MFA to allow their agents to work. Any guesses on what will happen to passkeys? If syncing of the private key was the worst that you thought could happen…. There will people looking at how authorized session hijacking can become a feature to leverage, much like how Selenium allows direct manipulation of cookies and local storage, enabling agents to hoover up valid session tokens and bypass login screens. Case in point: Build MCP servers for any website with automatic browser auth syncing Just like Selenium can sometimes bypass automation (bot) detection protections using headless browsing and user-agent spoofing, expect Agentic AI tools to develop capabilities to do the same.

2) Violating Authorization Boundaries (When They Exist)

QA Automation scripts often execute actions as a high-privilege test user (e.g., an admin account) to avoid breaking tests that are verifying functionality but not data or access restrictions. The rush to deploy Web-based Agentic AI tools will mean that like other tools of the past, it won’t be built with proper scope controls, thereby driving implementors to grant it excessive privileges. You can guess the rest.

As for consumer applications, those rarely have differentiated access control models built in for their users. That means a customer that wants to use a CUA, but limit what it can and cannot do will be out of luck. We saw this play out in the days of screenscraping-based personal finance applications, and how long it took for us to move everyone over to OAuth2 and FAPI as the better and more secure approach.

3) Weakening Security Controls

(aka “Is that a DDoS attack, or an army of Agents here to take advantage of the limited time deal we announced?”)

It won’t just be Authentication controls that are impacted. There are many security protections that will likely be obstacles in the path of Web-based Agentic AI. Would any of us be surprised to find out that IT teams were told to weaken or disable security mechanisms (e.g., Content Security Policy, SameSite cookies, Bot and DDoS detection) to facilitate automated agents, inadvertently creating vulnerabilities?

And these are just what immediately jumped to mind. I am sure there are many more that I’m not even thinking of.

Identity vendors and practitioners everywhere really need to shift into high gear to help organizations properly prepare for what’s headed their way. The demand to support Web-based Agentic AI will put a great deal of pressure on them to enable safe acceptance, and being the “Agent of No” (see what I did there) is not likely to go well. As for what can be done – more on that later.


Damien Bod

Multiple client sign-in customizations using Duende identity provider

This post looks at customizing the sign-in UI and the sign-in options in an ASP.NET Core application using Duende IdentityServer and ASP.NET Core Identity. There are multiple ways of changing the look and feel of the UI for different OpenID Connect clients or different client flows. Code: https://github.com/damienbod/duende-multi-tenant Blogs in the series Setup The solution […]

This post looks at customizing the sign-in UI and the sign-in options in an ASP.NET Core application using Duende IdentityServer and ASP.NET Core Identity. There are multiple ways of changing the look and feel of the UI for different OpenID Connect clients or different client flows.

Code: https://github.com/damienbod/duende-multi-tenant

Blogs in the series Multiple client sign-in customizations using Duende identity provider Customizing a single client sign-in using parameters in Duende IdentityServer Setup

The solution is setup using three different ASP.NET Core applications. In the example code, the “Admin” application has different federation authentication options compared to the “Shop” client authentication sign-in experience. The client ID from the authentication context is used to customize the look and feel, i.e. the styles, the layout and the options of the client are used to define which federation and authentication options are possible.

Customization of the sign-in options

The EnableLocalLogin parameter and the IdentityProviderRestrictions parameter from Duende IdentityServer can be used to change the sign-in options for the end user of the applications. If the EnableLocalLogin option is set to false, the define username, password login is disabled. The IdentityProviderRestrictions setting can be used to define which federation options are allowed for the client sign-in.

new Client { ClientId = "shop-client-ui", // more client options ... // show/hide the local authentication screen EnableLocalLogin = false // federated authentication options to display // empty displays all IdentityProviderRestrictions = ["AdminEntraID"] },

Layout Customization for clients

Sometimes the identity provider application need to display a different look and feel for the different clients. To achieve this, a separate login screen is used and each login screen uses a different layout. The layout and the style are changed using the client ID from the authorization context. If the shop client is used, the user is redirect to a different Razor Page. The UseShopClientDisplay bool is used for this.

private async Task BuildModelAsync(string? returnUrl) { Input = new InputModel { ReturnUrl = returnUrl }; var context = await _interaction.GetAuthorizationContextAsync(returnUrl); if (context?.Client.ClientId == "shop-client-ui") { View = new ViewModel { UseShopClientDisplay = true }; // Process in the shop client login return; } // standard code from duende template }

In the Login Razor Page on get method, the user is redirected to a different layout if the UseShopClientDisplay is true. The returnUrl is passed as a parameter.

public async Task<IActionResult> OnGet(string? returnUrl) { await BuildModelAsync(returnUrl); if (View.IsExternalLoginOnly) { // we only have one option for logging in and it's an external provider return RedirectToPage("/ExternalLogin/Challenge", new { scheme = View.ExternalLoginScheme, returnUrl }); } if (View.UseShopClientDisplay) { return RedirectToPage("ShopClient", new { returnUrl }); } return Page(); }

The HTML part of the Razor Page uses a different Layout and the Layout is set explicitly in the Razor Page.

@page @model IdentityProvider.Pages.Login.ShopClient @{ Layout = "Shared/_LayoutShopClient"; } <div class="login-page"> <div class="lead"> <h1>Shop Client Login</h1> <p>Choose how to login</p> </div>

Different, options, styles and layouts can be setup for any clients.

Or a different client display using the ClientID as the switch:

With this setup any CSS and any layout can be used for the different clients. This is one way of having a multi-tenant or multiple client setup. This setup uses a different Client ID to style and add or remove options.

Notes

This works well and does not require much effort. Sometimes customization is required within a single client. If you intend to use this in a multiple tenant solution, you should disable the default sign-in screen if building from the ASP.NET Core Identity templates. In a follow up post, I will look at further customization within a single client option.

Links

https://docs.duendesoftware.com/identityserver/v7

https://docs.duendesoftware.com/identityserver/v7/ui/federation/

https://learn.microsoft.com/en-us/aspnet/core/razor-pages


Mike Jones: self-issued

Twenty Years of Digital Identity!

Kim Cameron first told me what Digital Identity is on February 1, 2005. He said that the Internet was created without an identity layer. He encouraged me “You should come help build it with me.” I’ve been at it ever since! What I wrote about digital identity a decade ago remains as true today: An […]

Kim Cameron first told me what Digital Identity is on February 1, 2005. He said that the Internet was created without an identity layer. He encouraged me “You should come help build it with me.” I’ve been at it ever since!

What I wrote about digital identity a decade ago remains as true today:

An interesting thing about digital identity is that, by definition, it’s not a problem that any one company can solve, no matter how great their technology is. For digital identity to be “solved”, the solution has to be broadly adopted, or else people will continue having different experiences at different sites and applications. Solving digital identity requires ubiquitously adopted identity standards. Part of the fun and the challenge is making that happen.

I’m not going to even try to list all the meaningful identity and security initiatives that I’ve had the privilege to work on with many of you. But I can’t resist saying that, in my view, OpenID Connect, JSON Web Token (JWT), and OAuth 2.0 are the ones that we knocked out of the park. I tried to distill the lessons learned from many of the initiatives, both successes and failures, during my 2023 EIC keynote Touchstones Along My Identity Journey. And there’s a fairly complete list of the consequential things I’ve gotten to work on in my Standards CV.

I’ll also call attention to 2025 marking twenty years of the Internet Identity Workshop. I attended the first one, which was held in Berkeley, California in October 2005, and all but one since. What a cast of characters I met there, many of whom I continue working with to this day!

As a personal testament to the value of IIW, it’s where many of the foundational decisions about what became JWS, JWE, JWK, JWT, and OpenID Connect were made. Particularly, see my post documenting decisions made at IIW about JWS, including the header.payload.signature representation of the JWS Compact Serialization and the decision to secure the Header Parameters. And see the posts following it on JWE decisions, naming decisions, and JWK decisions. IIW continues playing the role of enabling foundational discussions for emerging identity technologies today!

It’s been a privilege working with all of you for these two decades, and I love what we’ve accomplished together! There’s plenty of consequential work under way and I’m really looking forward to what comes next.

Images are courtesy of Doc Searls. Each photo links to the original.

Saturday, 01. February 2025

Werdmüller on Medium

I want you to do these four things right now

Some simple steps to keep yourself safe. Continue reading on Medium »

Some simple steps to keep yourself safe.

Continue reading on Medium »

Friday, 31. January 2025

@_Nat Zone

世界のデジタルIDと認証技術のトレンド:1月31日版

イギリス: AIによる年齢確認 アメリカ: フィンテックでの企業買収 グローバル: デジタルトラベルクレデンシャル(DTC)の進展 アゼルバイジャン: デジタル開発コンセプト ヨーロッパ: ソーシャルメディアとデジタルIDの連携 デジタルID市場の成長 マレーシア: ブロックチェ…
イギリス: AIによる年齢確認 ジョン・ルイスがAIを活用した年齢確認をオンラインナイフ販売に初導入。 Yoti社が開発した顔年齢推定技術を使用。 18歳未満を誤認するリスクを回避するため高い年齢基準を適用。 アメリカ: フィンテックでの企業買収 iCapitalがParallel Marketsを買収、投資家のオンボーディングを効率化。 再利用可能な投資家パスポートを提供し、コンプライアンスの負担を軽減。 AIと機械学習を活用した自動化が進む。 グローバル: デジタルトラベルクレデンシャル(DTC)の進展 RegulaがDocument Reader SDKを拡張し、デジタルトラベルクレデンシャルをサポート。 スマホやパスポートリーダーで仮想コンポーネントを作成可能。 公的機関による完全なデジタル認証の実現を目指す。 アゼルバイジャン: デジタル開発コンセプト 大統領が「デジタル開発コンセプト」を起動。 公共行政のデジタル化と高度技術の統合を推進。 デジタル教育とICT訓練による経済成長を目指す。 ヨーロッパ: ソーシャルメディアとデジタルIDの連携 スペイン首相がEUソーシャルメディアアカウントをEUデジタルIDウォレットと連携提案。 匿名性を減らし、行動責任を促進。 子供の保護やボットの影響削減を目指す。 デジタルID市場の成長 2023年の市場規模は324億ドル、2032年には1,426億ドルに成長予測。 2024年から2032年まで年平均成長率17.90%を記録する見込み。 マレーシア: ブロックチェーンのデジタルID MYEGとMyDigital ID Solutionsが協力し、全国的なブロックチェーン基盤のデジタルIDエコシステムを構築。 eウォレットや開発ツール環境を提供。 地域での相互運用可能なデジタル規格のニーズに対応。

(出所) https://www.thinkdigitalpartners.com/news/2025/01/27/digital-identity-global-roundup-201/

英国の電子渡航認証(ETA) 英国は、電子渡航認証(ETA)システムを国境セキュリティのために拡張中。 ビザ免除国からの渡航者に対し事前デジタル審査を義務化。 入国手続きの効率化およびセキュリティの強化が目標。 韓国のデジタル在留カード 外国人在住者はスマートフォンを使用してデジタル在留カードを申請可能。 デジタルカードは物理カードと同等の法的効力を持つ。 デジタルカードをデジタル金融サービスと統合する計画を推進中。 デジタルアイデンティティにおけるグローバルトレンド Prove社がPortablを買収し、再利用可能なID確認に注力。 カタールは国のデジタル認証戦略の一環として統一デジタルIDシステムを確立。 Credas Technologiesが英国での成長を背景に国際展開を拡大。 ジュニパー・リサーチは、2029年までに世界人口の3分の2以上がデジタルウォレットを所有すると予測。

(出所) https://www.thinkdigitalpartners.com/news/2025/01/20/digital-identity-global-roundup-200/

ナイジェリアのデジタルIDイニシアチブ ナイジェリアの国家身分管理委員会(NIMC)はデジタルIDの展開を強化する方法を模索中。 デジタルID登録プロセスに虹彩バイオメトリクスを追加する計画。 この追加は、障害を持つ市民がより多くのサービスにアクセスできるようにすることを目的。 セルビアのデジタルアイデンティティウォレット セルビアは2025年末までにデジタルアイデンティティウォレットを導入予定。 導入はEUのプロトコル標準化次第。 EUデジタルアイデンティティフレームワークは2024年5月に施行、2026年までに加盟国がEU版ウォレットを提供する必要あり。 イギリスの身分証明に関するパートナーシッ Vouchsafe社はCarefreeと提携し、写真付きIDを持たない無給介護者を支援。 無給介護者が写真無しで身分証明を可能にする統合を提供。 登録を簡素化し、無給介護者のサービスアクセスを改善することを目指している。 ヨーロッパのAIと身分証明技術 IDnow社がEU資金提供のACHILLESプロジェクトに参加。 このプロジェクトはHorizon Europe Framework Programmeの下で800万ユーロ以上の助成を受ける。 AIシステムの効率性と信頼性向上を目的とし、身分証明を含む多分野における応用に焦点が当てられている。

(出所) https://www.thinkdigitalpartners.com/news/2025/01/13/digital-identity-global-roundup-199/

モロッコのデジタルID拡大 2024年に約470万枚の電子国民IDカードを発行 信頼できる第三者ID確認プラットフォームを通じたデジタルIDシステム第2フェーズを実施 Bank Al-Maghribや医療機関を含む17の主要機関と枠組み協定を締結 30以上の機関が基本サービス提供のためプラットフォームを利用 ナイジェリアのID4Dプロジェクト 世界銀行がID4Dプロジェクトを2026年12月まで延長、1億8000万人分の新IDを対象 政府の要請に基づきプロジェクト拡張により国民ID管理システムを8300万ドルで近代化 生体認証により6400万以上の銀行口座を保護 プロジェクト予算は4億3000万ドルへ増額、国民登録とNIN発行を促進 アメリカでのデジタルIDの取り組み イリノイ州でモバイルIDカードとプライバシー保護に関する法律を制定 Google Walletが6つの州で運転免許証や州IDをサポートする機能を拡張 authIDがAccountable Digital Identity Associationに加盟し、標準化された分散型IDサービスを推進 デジタルIDとブロックチェーンチケットによりスタジアムでの待機時間を大幅短縮 世界のデジタルIDの進展 ベトナムではソーシャルメディア利用者に携帯番号または国民IDでのアカウント認証を義務化 サウジアラビアはAbsherプラットフォームで2800万以上の統一デジタルIDを発行 韓国は9つの地域でモバイルIDカードの試験導入を実施 セントクリストファー・ネイビスは2025年末までに台湾のICDFと協力し、電子IDシステムを開始予定

(出所) https://www.thinkdigitalpartners.com/news/2025/01/06/digital-identity-global-roundup-198/

Thursday, 30. January 2025

The Pragmatic Engineer

The Pulse #122: DeepSeek rocks the tech industry

Almost unknown Chinese lab releases AI model that’s open, free, and as good as ChatGPT’s best models. Oh, and it’s also cheaper to operate. This has sent shockwaves through the AI sector

The Pulse is a series covering insights, patterns, and trends within Big Tech and startups. Notice an interesting event or trend? Send me a message.

This week, a massive event shook the tech industry: a lesser-known Chinese AI lab shocked the markets and tech professionals with the DeepSeek AI model, which feels on a par with OpenAI’s most capable publicly available model, ChatGPT o1. OpenAI has a more advanced o3 model, but it’s in preview and isn’t publicly available yet. DeepSeek is released as open and free to use within the DeepSeek app, or for anyone to host and download it.

Major AI companies are coming to terms with the fact that a small team in China with supposedly little funding, and no access to NVIDIA’s latest AI chips, could pull this feat off. It shatters the image of OpenAI’s invincibility, the notion that the US leads the AI race, and also raises the question of whether open models will turn advanced LLMs into a commodity.

Today, we cover:

The first “thinking model” that feels fast – and is a hit

About 4x cheaper — and possibly more efficient? — than ChatGPT

Open model spreads fast

OpenAI’s need to remain fully closed highlighted by DeepSeek

How did DeepSeek do it, and why give it away for free?

Geopolitics and export controls

Google feared open source AI will win

1. The first “thinking model” that feels fast – and is a hit

On Monday, NVIDIA’s valuation plummeted from $3.5 trillion to $2.9 trillion; an almost $600B reduction in its market cap on a 17% drop in the stock price. This was reported as the biggest ever fall by a U.S. company. The cause? A new Large Language Model (LLM) model called DeepSeek built by a Chinese AI startup, which has been an overnight sensation. Also on the same day, the DeepSeek app (built by the same company) hit the #1 spot on the US App Store on both iOS and Android, making it more downloaded than ChatGPT, which was relegated to #2. DeepSeek has remained #1 since.

Top iOS apps in the US. It’s rare for an app by a Chinese developer to hit top spot. DeepSeek is #1 on Android as well

What’s the cause of Deepseek’s sudden popularity? It’s thanks to the company updating the app to enable its “DeepThink (R1)” mode that uses their DeepSeek-R1 model. This model is similar to OpenAI’s o1 model in that it takes more ‘thinking time’ to respond, by using more compute to serve up a better response.

A big difference is that DeepSeek displays the model’s “chain of thought”, whereas OpenAI hides what happens during the “thinking” phase. So, the model feels much more “snappy” than OpenAI’s o1, more transparent, and more relatable. And frankly, it’s a far better experience to watch the model “think out loud” for 30 seconds, than watching ChatGPT’s spinner for 30 seconds.

Here’s a good example of what happens when asking a question that trips a lot of LLMs up: “if a chicken says ‘all chickens are liars’ is the chicken telling the truth?” DeepSeek starts to “think” for nearly a minute, spitting out pages-worth of internal monologue:

DeepSeek shows its inner prompts while “thinking” up a response. It generated four times as much to answer the riddle I posed

In the end, the answer it generates concludes the question is a paradox. The output is pretty similar to what OpenAI’s o1 produces, except o1 takes around the same time (38 seconds) to “think” and doesn’t show anything to the user.

DeepSeek: free, OpenAI: $20-200/month. An obvious reason for the DeepSeek app’s popularity is that it’s free and offers virtually the same functionality as paid ChatGPT plans, which cost $20/month for limited access, and $200/month for unlimited access to the advanced o1 and o1-mini models. DeepSeek offers all of this for free, while somehow dealing with what look like enormous loads. The key to this is that DeepSeek seems to be an order of magnitude cheaper to operate than existing models, like OpenAI’s’.

2. About 4x cheaper — and possibly more efficient? — than ChatGPT

The team behind DeepSeek found dozens of approaches to improve efficiency of their model – and published these optimizations in a paper titled DeepSeek-V3 Technical Report. Novel optimization methods include:

Read more


Heres Tom with the Weather

Win Stupid Prizes

Deadly D.C. Plane Crash Comes Months After Congress Ignored Warning About Traffic at Reagan Airport As the new administration is playing stupid games, yesterday morning, prior to yesterday’s aviation disaster, professor Thomas Schaller cautioned: An FAA employee I know confirms agency already lacks sufficient air traffic controllers. The so-called “buyouts” and other attacks on federa

Deadly D.C. Plane Crash Comes Months After Congress Ignored Warning About Traffic at Reagan Airport

As the new administration is playing stupid games, yesterday morning, prior to yesterday’s aviation disaster, professor Thomas Schaller cautioned:

An FAA employee I know confirms agency already lacks sufficient air traffic controllers. The so-called “buyouts” and other attacks on federal employees won’t help. Remember that fact when the flight delays (crashes?) commence and Trumpers start falsely blaming DEI or Biden.

This should be a wakeup call and I have a deeper appreciation for people like Phyllis Fong who this week have resisted the illegal orders that are already causing significant harm. On the other hand, if you like anarchy and disaster, congratulations.

Wednesday, 29. January 2025

The Pragmatic Engineer

Building a best-selling game with a tiny team – with Jonas Tyroller

In today’s episode of The Pragmatic Engineer, I’m joined by Jonas Tyroller, one of the developers behind Thronefall, a minimalist indie strategy game that blends tower defense and kingdom-building.
Stream the Latest Episode

Available now on YouTube, Apple and Spotify. See the episode transcript at the top of this page, and a summary at the bottom.

Brought to You By

Formation — Level up your career and compensation with Formation.

WorkOS — The modern identity platform for B2B SaaS

Vanta — Automate compliance and simplify security with Vanta.

In This Episode

In today’s episode of The Pragmatic Engineer, I’m joined by Jonas Tyroller, one of the developers behind Thronefall. Thronefall is a minimalist indie strategy game that blends tower defense and kingdom-building, now available on Steam. Developed by just two developers, it sold 1M copies in the first year of its launch: quite the hit for a game priced at $12.99!

A screenshot from the game Thronefall. This episode goes behind the scenes to walk through how two devs built this indie hit game

Jonas takes us through the journey of creating Thronefall from start to finish, offering insights into the world of indie game development. We explore:

Why indie developers often skip traditional testing and how they find bugs

The developer workflow using Unity, C# and Blender

The two types of prototypes game developers build

Why Jonas spent months building game prototypes in 1-2 days

How Jonas uses ChatGPT to build games

Jonas’s tips on making games that sell

And more!

If you enjoy playing games, or one day perhaps could see yourself building your own game: this episode is for you.

Takeaways

My biggest takeaways from this episode:

It takes a lot of different skills to be a successful indie game developer. Jonas balances design, development, creating music, thinking about marketability, creating YouTube videos to share process (and get traction), building prototypes — just to name a few activities.

Graph theory can be surprisingly useful at times! Jonas used the A* pathfinding algorithm with this game: and fought a lot at making pathfinding “feel right.” It’s a good example on how computer science theory can become useful in various situations.

Engineering best practices don’t apply to most indie games. Jonas was almost embarrassed to admit they don’t do code reviews, don’t write unit tests and that the code quality could be better. However, indie games are built to ship once: so why overdo it? By all accounts, Thronefall is a smash success, with close to 1M sales. Code reviews and unit tests would have not helped this project with two experienced developers — though the lack of them might slow down larger projects!

To be good at building games: build a lot of games! Jonas made game development sound easy. However, I learned that he has 20 years of game development experience: having been building games since he was 9 years old! Here is a video about the close to hundred games he’s built. Most of them are very simple.

It’s easier than ever to build a game. Unity provides excellent tooling, and there are so many resources on how to build games — videos, tutorials, blogs, books. If you know how to code: you can build a simple game, the very least. We shared a tutorial: Building a simple game using Unity, if you want to get started.

The Pragmatic Engineer deepdives relevant for this episode

Game development basics

Building a simple game using Unity

Timestamps

(00:00) Intro

(02:07) Building in Unity

(04:05) What the shader tool is used for

(08:44) How a Unity build is structured

(11:01) How game developers write and debug code

(16:21) Jonas’s Unity workflow

(18:13) Importing assets from Blender

(21:06) The size of Thronefall and how it can be so small

(24:04) Jonas’s thoughts on code review

(26:42) Why practices like code review and source control might not be relevant for all contexts

(30:40) How Jonas and Paul ensure the game is fun

(32:25) How Jonas and Paul used beta testing feedback to improve their game

(35:14) The mini-games in Thronefall and why they are so difficult

(38:14) The struggle to find the right level of difficulty for the game

(41:43) Porting to Nintendo Switch

(45:11) The prototypes Jonas and Paul made to get to Thronefall

(46:59) The challenge of finding something you want to build that will sell

(47:20) Jonas’s ideation process and how they figure out what to build

(49:35) How Thronefall evolved from a mini-game prototype

(51:50) How long you spend on prototyping

(52:30) A lesson in failing fast

(53:50) The gameplay prototype vs. the art prototype

(55:53) How Jonas and Paul distribute work

(57:35) Next steps after having the play prototype and art prototype

(59:36) How a launch on Steam works

(1:01:18) Why pathfinding was the most challenging part of building Thronefall

(1:08:40) Gen AI tools for building indie games

(1:09:50) How Jonas uses ChatGPT for editing code and as a translator

(1:13:25) The pros and cons of being an indie developer

(1:15:32) Jonas’s advice for software engineers looking to get into indie game development

(1:19:32) What to look for in a game design school

(1:22:46) How luck figures into success and Jonas’s tips for building a game that sells

(1:26:32) Rapid fire round

A summary of the conversation Game Development Philosophy and Process

Finding a balance between personal interest and marketability: a key challenge for indie game developers. Finding something that will sell is difficult enough on its own, but finding something that will sell that you also enjoy working on is very tricky. The approach is to make a lot of things that you can imagine working on that are interesting and then try to measure or guess how well they might do on the market. Then, focus on the most promising ideas.

“What do I want to create today?” After opening up Unity, this is how a typical enough day starts for Jonas. He comes up with a random idea that he finds interesting and “just” makes it.

Games can be made very quickly. This is especially true for simple prototypes without fancy graphics or menus. Polishing and getting to production quality takes the most time. Keep in mind that Jonas has created closer to a hundred small games before, though!

Unity + C#: the development stack Jonas uses.

Scenes: the backbone of the project structure. In Thronefall a scene is basically a level. Each scene contains objects with attached scripts that dictate their behavior. These scripts are MonoBehaviours that inherit from the mono behavior class and are attached to game objects. We covered these concepts in the deepdive Building a Simple Game using Unity

Indie developers often write 'spaghetti code'. It’s also common enough to not write any unit tests. Jonas believes that unit tests are not critical for smaller indie games: but they do become more important at a larger scale.

QA process: “works on my machine,” beta testing and release. Modern game engines are a “godsend” for fewer bugs. If it “works on my machine” there’s a fair chance it works on everyone’s machine with robust game engines. For indie games, bugs are usually found through self-testing, beta testing, and ,finally by real players after the game is released.

Tools, Workflow, and Team Dynamics

Visual editing + code changes: this is the workflow Jonas follows. When building a new level, most of his time is spent moving things around in the Unity editor. He uses Blender for 3D modeling, where models are created and then integrated into Unity.

No code review. Not for a small indie game with two developers!

Push straight to main branch. And try to not break the game for the other dev!

Splitting the work: one Jonas focused more on the gameplay, and the other dev (Paul) did a lot more of the user interface. They also “cross-tested” each other’s work for functionality and the “fun factor.”

Listen to playtesters. Early playtesters reported that there were too few choices for the building upgrades: and so the team took this feedback and implemented more choices for upgrades.

Balancing levels is an art. Game devs are a lot better at playing the game than the average player. So they need to make levels to a difficulty that feels “stupid easy” for them – at least for early levels.

Strategy games are “snowbally.” This means that it is exponentially more difficult to recover from falling behind. To smooth this out, Jonas coded up enemies dropping gold in order to smooth out the economy curve. This made the game easier to balance because the amount of gold a player has at a given time is easier to predict.

Development and release

Prototyping: the first phase. The two devs created prototypes and mini-games, not spending more than 1-2 days on them. The time reserved for prototyping is scaled to the size of the project. For a two-year game, two months of prototyping could be a good rule-of-thumb. Prototypes help figure out what might sell well, and what the devs also enjoy working on.

Gameplay first. During the prototyping phase, gameplay is explored before visuals. Gameplay prototypes consist of simple shapes and colours and that visual prototypes are created after gameplay, and are composed of scenes without any logic or motion.

Major development challenge: pathfinding. For this game, Jonas spent a lot of time on this problem. How will units move “correctly?” How to ensure they don’t go through walls? The team bought a plugin from the Unity Asset Store using the A* pathfinding algorithm, and then customized it. Units don’t exactly move on nodes, so additional post-processing is required to ensure they are taking the straightest path between nodes.

ChatGPT: helpful for development. Jonas uses it to generate skeleton code, which is then filled in, and to translate shader code or answer questions on unfamiliar subjects.

Steam: a no-brainer. Steam is the go-to platform for indie developers, and Steam sales usually make up the vast majority of sales compared to other platforms.

The launch: not as fancy as you’d think! As per Jonas, the launch was surprisingly anticlimactic. He just pressed a button in the Steam backend.

The reality of being an indie developer

Bureaucracy: the dreaded part. Jonas hates bureaucracy the most in being an indie game developer. Things like filling out Steam forms, legal documents, and dealing with lawyers.

Advice: don’t build your own game engine! The single biggest advice Jonas has for a developer building their own game: do NOT turn it into building a game engine! It’s too tempting, but is a waste of effort for the most part.

“Bigger” games don’t necessarily sell better. Smaller games often have a better payoff-to-effort ratio because they are easier to make successful and the user experience should be prioritized before the engineering behind it.

University was helpful. Jonas says that it is possible to be self-taught in game development. However, for him, going to a game development college connected him with a valuable network of people. Both games that sold 1M+ copies he built with people he met at his university at HTW Berlin

How to succeed as an indie game developer? Find the correct overlap between something you enjoy and something that will also perform well in the market. It is not enough to just make a perfect game; it must be the right game. You also need to make a game for others, not just yourself!

Resources & Mentions

Where to find Jonas Tyroller:

• X: https://x.com/jonastyroller

• LinkedIn: https://www.linkedin.com/in/jonas-tyroller-213a63144/

• YouTube: https://www.youtube.com/c/JonasTyroller

Mentions during the episode:

• Thronefall on Steam: https://store.steampowered.com/app/2239150/Thronefall/

• Unity: https://unity.com/

• C Sharp: https://en.wikipedia.org/wiki/C_Sharp_(programming_language)#

• Blender: https://www.blender.org/

• Adopting Software Engineering Practices Across the Team: https://newsletter.pragmaticengineer.com/p/engineering-practices

• Warp Digital: https://warpdigital.com/

• Islanders on Steam: https://store.steampowered.com/app/1046030/ISLANDERS/

• Coatsink: https://coatsink.com/

• Will You Snail on Steam: https://store.steampowered.com/app/1115050/Will_You_Snail/

• No Gravity Games: https://nogravitygames.com/

• Miro: https://miro.com/

• A* algorithm: https://en.wikipedia.org/wiki/A*_search_algorithm

• ChatGPT: https://chatgpt.com/

• Claude: https://claude.ai

• Github Copilot: https://github.com/features/copilot

• Godot: https://godotengine.org/

• GameMaker: https://gamemaker.io/en

• Game Design program at Hochschule für Technik und Wirtschaft Berlin

University: https://gamedesign.htw-berlin.de/en/

• Opus Magnum on Steam: https://store.steampowered.com/app/558990/Opus_Magnum/

• Outer Wilds on Steam: https://store.steampowered.com/app/753640/Outer_Wilds/

• GAMEDEV: 10 Steps to Making Your First Game Successful: https://www.amazon.com/GAMEDEV-Steps-Making-First-Successful-ebook/dp/B08CBLXPB7

• Flow: The Psychology of Optimal Experience: https://www.amazon.com/Flow-Psychology-Experience-Perennial-Classics/dp/0061339202/

• Game Development Basics:

https://newsletter.pragmaticengineer.com/p/game-development-basics

• Building a Simple Game: https://newsletter.pragmaticengineer.com/p/building-a-simple-game

Production and marketing by Pen Name. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.


The Tao of XDI

Take 1... Solid Pods and Dids

My first attempt at building a decentralized app in this day and age will use Solid Pods and DIDs. The goal? A super simple “BooksWeLike” app—a place where I can review books and see what my friends are reading and enjoying. What makes this app different is how it handles data. Unlike traditional apps where data lives in a centralized database, my app will let users store their own data in Sol

My first attempt at building a decentralized app in this day and age will use Solid Pods and DIDs. The goal? A super simple “BooksWeLike” app—a place where I can review books and see what my friends are reading and enjoying.


What makes this app different is how it handles data. Unlike traditional apps where data lives in a centralized database, my app will let users store their own data in Solid Pods. Think of a Pod as your own personal data vault—you control who can access it and how it’s used. And instead of relying on centralized logins like Google or Facebook, I’ll use Decentralized Identifiers (DIDs), which allow users to prove their identity on their own terms.


The plan for the app is straightforward:

• If you already have a DID or a Solid Pod, you can sign in using your existing accounts.

• If you don’t, the app will help you create them when you sign up.


Of course, part of this journey is figuring out how practical and possible all of this really is. Beyond building the app, I’ll also evaluate the tools, SDKs, client libraries, and documentation available for Solid and DID developers. How well is the building community being enabled? I’ll compare my experience with other distributed ecosystems as I attempt to replicate this app in different environments in the future. Once the app exists across multiple ecosystems, I can explore broader topics like ecosystem interoperability and federation.


These technologies are still evolving, and I’m excited to explore what’s possible—and what needs improvement.


So, what about you? Have you already taken the plunge into the world of DIDs or Solid Pods? Or is this your first time hearing about them? Let’s find out together as I document this journey.


In my next post, I’ll dive into the nitty-gritty of authentication—getting users to log in with their DIDs and connecting them to their Pods. I suspect it’s trickier than it sounds, but that’s all part of the adventure.

Tuesday, 28. January 2025

The Pragmatic Engineer

Taking on Google search: Perplexity and Kagi

Google’s dominance of web search is being challenged by innovative, fast-moving startups. A deepdive into two promising contenders: Perplexity and Kagi

Hi – this is Gergely with the monthly, free issue of the Pragmatic Engineer Newsletter. In every issue, I cover challenges at Big Tech and startups through the lens of engineering managers and senior engineers. If you’ve been forwarded this email, you can subscribe here.

Google is the undisputed king of search engines, with around 90% market share. The product generates revenue exclusively via advertising, and it is a lot. The tech giant’s revenue from ads placed in users’ search results has exploded in 20 years: from $1B in 2004, to around $200B, last year. Today, around 70% of Google’s revenue comes from this single source, alone.

Predictably, this has led to Google search starting to feel more like an “ads engine”, and less like a search engine. About a year ago, I began using alternatives, and have since replaced day-to-day use of Google search with two other products developed by startups:

Perplexity: an AI-powered search engine and answer engine, changing how people discover information online. It’s a VC-funded startup on the rise.

Kagi: a search engine with no ads, which gives “power back to the user.” A bootstrapped, profitable company growing at a reasonable pace.

To learn more about these challengers to Google search, I reached out to both to ask how their engineering teams operate in this bold mission to disrupt the web search market.

Note: I have no commercial affiliation with Perplexity or Kagi, and was not paid to write about them in this article. I also get no compensation from the special offers for my subscribers (see below). Indeed, it was I who asked if these companies would consider making these offers. See more in my ethics statement.

Special offer: paying subscribers of The Pragmatic Engineer get free access to paid versions of Perplexity and Kagi. As a paid subscriber, you get:

Perplexity Pro for one year (worth $200)

Kagi Ultimate for 3 months (worth $75)

Get Perplexity Pro and Kagi Ultimate

See more context and details on this offer.

Today, we cover:

Backgrounds and cultures. One of these companies is rumored to be valued at $9B, while the other has taken no VC-funding. Perplexity is mostly in-office these days, while Kagi is full-remote.

Tech stack and AI tools. Kagi uses the lesser-known Crystal programming language and builds a simple but novel message-passing system. Perplexity is built on React+NextJS, and also uses its own custom LLMs.

How does Kagi index? A search engine is only as good as its index. Kagi aims to only crawl high-quality websites, and to skip sites with too many ads. This custom index explains its distinctive search results, compared to other search engines.

How is Perplexity so fast? Speed is an important differentiator for Perplexity, and a source of constant tweaking. Surprisingly, the product runs multiple models for every query, under the hood.

Engineering practices. At Perplexity, there’s no formal design review process, and AI evaluations are defined upfront. At Kagi, there’s “checkpoint standups” and trunk-based development. Both companies use Linear for task and project management. For more about the innovative project management startup, Linear, check out this deepdive.

Product milestones. Perplexity employed a smart strategy of initially launching as something akin to a lightweight wrapper, and then built their own search index, API, and custom features such as “Shop Like a Pro.” Meanwhile, Kagi spent considerable time building out the core experience, and then launched lots of additions like FastGPT, Kagi Translate, and more.

Unique challenges of “search engine engineering”. For Perplexity, creating a “futuristic” experience was probably the trickiest part. For Kagi, it’s the attention to even the smallest details, in order to gain and retain customers.

This is an engineering culture deepdive. See similar ones about Meta, Amazon, Stripe, OpenAI, Figma and several other tech companies.

Thanks to Alex Lang (engineering lead at Perplexity), Zac Nowicki (tech lead at Kagi Search), and Vladimir Prelovac (founder and CEO at Kagi Search) for sharing interesting details.

1. Backgrounds and company cultures Perplexity

Some stats about this Google search challenger:

2022: Founded by Aravind Srinivas (CEO), Denis Yarats (CTO), Johnny Ho (Chief Strategy Officer), and Andy Konwinski

$9 billion: Rumoured valuation as of December 2024; up from $520 million just a year ago. This is truly standout for such a young company!

20 million search queries per day: the latest milestone hit; almost a 10x increase on a year ago, when there were 2.5M search queries.

165 people: team size, two-thirds of whom work on the tech team.

The tech organization is currently structured as four groups, with some groups consisting of several teams:

AI

Search

Product Engineering

Design

Perplexity’s company values:

Curiosity

Quality

Ownership

Velocity

Perplexity is mostly in-office, after operating as remote in its early days. While scaling up, the company is focused on hiring for the office; or at the very least, for pods in the same city. Perplexity has locations in:

San Francisco: 70 people

New York: 14 people

Austin, Texas: 9 people

Europe: 32 people

Remote, in the US: 37 people

What’s it like to work at Perplexity? Alex Lang says ownership and communication are priorities:

‘Everything for us works backwards from the end-user. We want to imbue a spirit of curiosity and quality that reflects the best ideal of an answer engine. Once we have found the right projects to tackle, we place extreme emphasis on ownership and velocity.

We want everyone to have high ownership and place a high bar on ourselves. We also recognize that impact delivered today has higher value than some improvement in the distant future.

We try to minimize standing meetings. Ongoing communication is extremely important for us. We value using Slack to communicate, hold a quick huddle if needed – but keep meetings to a minimum.’

Kagi

Some figures about the business:

2018: founded by Vlad Prelovac, in Palo Alto, US.

$0 raised in VC funding. In 2023 and 2024, the company raised funds – from users! A total of $2.4M.

~750,000 search queries per day: See realtime stats.

40 people: team size.

Live stats: See realtime details on the number of members (over 37,000), queries, families using the product (more than 3,000), and more. This is a surprising level of transparency!

Realtime stats at Kagi. When customer milestones are hit, the company marks the occasion. Last time, it shipped a t-shirt and sticker pack to early users. Source: Kagi

Of the 40-strong team, 30 are engineers. Engineering is divided into:

Core products (Search, Assistants, Maps): 15 engineers

Research and development (building new stuff): 5 engineers

Kagi is a remote-first working environment. Team composition by location:

US and Canada: ~45%

Europe: 40%

Asia: 15%

What’s it like to work at Kagi? Zac Nowicki says communication matters:

‘Open communication is king, in public channels, using our internal forum, staying out of DMs (unless discretion warrants it, of course). Some people can be shy about asking simple questions, but it is so important for optimizing remote communication loops and making issues (and wins!) visible. The worst thing is when some key decision was made behind "closed doors" and has repercussions we need to walk back weeks later. Or people debugging minor issues with our systems, out of sight from an engineering colleague who could solve the root cause, or otherwise inform our DX improvements.

‘In a physical working space, there is constant implicit communication; overhearing others, seeing things put on walls and whiteboards. Even body language; physically being able to see your coworker is having a hard time, and extending a helping hand. You don't put any effort into these things, they just happen.

‘Remote work is not for everyone because it’s a lot more effort to communicate openly. In remote, silence is the default. Nothing happens or has any nuance unless you put yourself forward and engage. Putting effort into crafting a safe space for open, remote communication that feels natural is important for leaders to put serious thought into.

‘Explicitly passing the baton comes to mind, too. If something needs a review, tag someone; anyone. It is okay if they don't have domain knowledge, as they will pass it to someone else if necessary. What doesn't work is putting things into the void and hoping someone will notice.’

2. Tech stack and AI tools

Let’s take a look at the technologies these two search startups use.

Perplexity

Frontend and backend

TypeScript as the preferred programming language

React as the frontend framework

Next.JS for server-side rendering as the full-stack framework powering the front and backends

Modern JavaScript stack: using tools like eslint (static code analyzer), turborepo (incremental bunder and build system for JavaScript and TypeScript), prettier (an opinionated code formatter / linter)

AI and machine learning (ML):

AI models: continuously keeping up with the latest foundational models. Perplexity evaluates them and uses ones that make the most sense.

Python and PyTorch (a deep-learning framework in Python)

Senior Frontend Engineer Oleg Akbarov said Perplexity moved from NextJS Pages Router to App Router, for a snappier web experience:

‘The Perplexity web experience was initially built as a NextJS web application using:

Pages Router for routing

Redux for state management

‘It was a great prototype and allowed a fast time to first byte (TTFB) experience for server-rendered routes. It also helped us ship a moderately dynamic experience within the pages.

‘However, about a year ago, we wanted to improve the navigation within the application and streamline the query submission experience. It was at this point that the performance limitations of a Pages Router became apparent. It was right at this time that the NextJS team introduced a new router version called App Router. App Router was a great fit for our use case: it allowed us to build rich, dynamic user interfaces without sacrificing the performance benefits of server-side rendering (SSR).

‘We needed to not slow down our shipping speed, while moving routing frameworks. Here is how we phased our migration:

Replace Redux with react-query. We did this because react-query has superior support for server rendering. It also has useful out-of-the-box features like optimistic updates and query revalidation (refreshing or updating cached queries to ensure they are up to date).

Gradually updating route logic. We carefully transitioned all the APIs from Pages Router to the new version, App Router.

Move data fetching logic. We moved data fetching logic to React Server Components (RSC).

‘Completing these stages took a few months. At the same time, we kept shipping new features even as the migration was ongoing. Best of all, the migration was invisible for end users.’

A lot of experimentation with AI tools: The Perplexity team is encouraged to experiment with AI tools. The most popular with engineers are:

GitHub Copilot and Cursor as IDEs. Most engineers inside the company use both – which was somewhat surprising to hear, as I’d assume engineers would settle on a favorite! Both have upsides, like Cursor’s Composer, and GitHub’s smooth integration with Visual Studio Code.

Internal tools to modify Perplexity’s custom LLMs. Perplexity has its own, internal large language models (LLM). This keeps being tweaked by the team, which requires engineering knowledge to do. The engineering team is also building tools so that later on, product managers can also make modifications.

Kagi

Here’s the tech stack behind Kagi:

Backend:

Crystal: the programming language used for the search binary. Crystal borrows a lot from Ruby (syntax/semantics), and Go (concurrency). The search binary contains all top level application logic and rendering.

Custom backend: The backend framework is largely custom; bootstrapped on some primitives from the standard library. Kagi uses a simple, novel message-passing system scripted using a visual diagramming tool.

Postgres: database of choice. For DB ops, the team uses Crystal's standard database driver for Postgres, and writes queries and migrations in raw SQL. The driver library provides a set of utilities for deserializing rows into types and connection poolings, which makes it very nice to use. Recently, the primary database instance was upgraded from 1vCPU with 4GB of ram, to something larger.

Frontend:

Server-side rendering using Jinja templates + JavaScript. The team uses an interpreter ported to Crystal for the Jinja templates.

As little JavaScript as possible. On principle, the Kagi team tries to use as little JavaScript as possible on the frontend, and to only use it to enhance the experience, not create it. They want to ensure the core search experience is usable without JS enabled at all. Ruthlessly trying to keep things simple is how they avoided having any serious use for Node in the build step, until very recently.

No client-side telemetry. This means no click tracking and no analytics. Admittedly, this creates challenges for both development and product. Still, the team believes it aligns with their values.

Zac shares the story of Kagi’s current backend, which is the second-generation:

‘After launching Kagi, we realized we needed to manage a ton of concurrent tasks, combined with even more checks and decision making. We needed to stay on top of a robust concurrent control flow, and not go crazy trying to debug it all. This was the motivator for the "second generation" backend.

‘Flow Based Programming (FBP) is the hidden gem we followed to build observable and complex concurrent systems. FBP is a methodology introduced in around the 1970s, and we use a modern variant that takes the simple ingredients:

Simple "black box" interface. One message in → multiple messages out

FIFO queues. First in, first out

Routing table. This describes how messages are transferred between components

‘These three components produce a system so "regular" that you can describe control flow with any off-the-shelf diagramming tool. Put simply, we could create visualizations of our system representing the full source of truth; we just needed to write an interpreter for it!

‘Compare this to the classic scenario of how understanding of systems becomes muddled:

Someone makes a nice diagram to help others understand a system’s inner workings.

From the start, this diagram is only going to represent someone's abstract idea of a system. This is a small enough problem early on, which most people gloss over.

As time goes on, the system changes but nobody updates the documentation, so it further drifts from truth.

Over time, the diagram no longer represents the system.

‘What we have done is establish a "domain specific language (DSL) for software architecture". As engineers, we can specify and communicate using the terms of these diagrams. We do not have to focus on small details that cause us to “not see the forest for the trees.” We can agree on the shape of a network, and leave other teammates to implement it, with fundamental guarantees of outcome, regardless of the “in the weeds” decisions they make.

‘The boundaries between messaging components become natural testing boundaries, without having to write code in a "testable" way. They lend themselves heavily to code reuse. The message passing history during a request gives us free observability in the form of tracing, with no explicit effort from a developer. The whole system works very well for us.’

3. How does Kagi index?

One of the most important parts of a search engine is its search index. Zac breaks down the process at Kagi:

‘We currently have about half a dozen different search indexes:

Teclis: index of the non-commercial web

Tinygem: index for trending news

Small Web is an index of personal blogs and websites

… and several more

‘A search index consists of three components:

Crawling

Indexing

Ranking

‘Each one comes with separate challenges:

‘Crawling the web is very different today to 20 years ago. Websites – especially big sites – are much more hostile to crawlers; probably for good reason! Luckily for us, we are not trying to crawl the entire web. Also, most websites we crawl are cooperative.

‘We do not index sites with too many ads. We crawl using a headless browser and with uBlock Origin extension installed, and count the number of ads and trackers on a page. If the figure is too high, we simply kick the page out of our index!

‘Indexing lets us do unique things most search engines don’t. The nature of our indexes is such that websites which get indexed tend to be high quality. We’ve noticed the number of ads and trackers on the page inversely correlates with the quality of content.

‘We surface the pages we consider high quality, pretty high up in our search results, which gives Kagi results a unique flavor. It also gives personal websites, blogs, and forums exposure in search, which they rarely get in other search engines.

‘Indexing and ranking utilize the newest machine learning techniques. For example, we use text embeddings, which allows us to search not just by keywords, but also by semantic meaning.

‘Kagi's indexes are focused on a very tiny portion of the web which allows us to be fast and cost effective. We hope this part of the web (not yet ruined by advertising) will grow in the future.’

4. How is Perplexity so fast?

One thing that stands out about Perplexity is that it’s very fast, despite being an AI search engine that needs to generate a lot of tokens (text) in realtime. How is it so rapid? Alex Lang explains:

‘Speed is a major focus that we optimize for because it has two major benefits:

Better UX. Quick responses dramatically improve user experience.

Lower cost. The faster an AI model produces an answer, the less computing resources it consumes. Having fast models actually reduces our infrastructure cost in serving answers!

‘Two things are worth highlighting:

We run multiple models for every query. Few people realize, but under the hood we are running multiple models to provide the final answer. We can do this because we’ve optimized to make these custom models as small as possible. We keep looking for ways to distill more knowledge into a smaller LLM. We also don’t shy away from using more traditional machine learning techniques if they give better results.

Building our custom scheduling and runtime engine. We are building this so we can have additional knobs to tune that aren’t available from third-party systems.

‘Both these approaches should unlock further speed gains; so expect Perplexity to speed up even more in the near future.’

5. Engineering practices Perplexity

Perplexity prefers lightweight processes and biases towards action, which means:

No formal design review process like design docs, RFCs, or ADRs. Most work starts with a quick Slack discussion, or a one-page document. The only exceptions are large-scale projects, which are still kicked off with a more traditional design process.

Code reviews: all PRs are reviewed before merging.

Staged rollouts: the norm across the engineering team.

Linear: used for task tracking. We published a deepdive on Linear’s engineering culture.

AI evaluations are defined upfront. This is an approach specific to working with LLMs. It’s roughly equivalent to a design review for non-AI engineering work. Engineering manager Alex Lang explains:

‘Detailed planning on the model side is a waste of time. This is because models and techniques are always changing, so any design needs to be agile and ready to switch at a moment's notice.

AI evaluations, however, are crucial to the final success of the product. Changing evaluations late in the process is extremely painful. Once we select the right evaluation, we keep this stable. We spend a lot of time and effort to go over details of the evaluation we are defining. By investing in this work upfront, we are able to guarantee the AI project will ultimately be a success.”

How does Perplexity hire? Alex Lang details the process:

‘Product sense is important for all our hires to have; we place great emphasis on this. Thanks to all engineers possessing it, the company has fewer engineering managers and product managers than many similar-sized companies. All product and engineering managers we hire are very technical, and strongly committed to empowering ICs.

We used to have trial periods, but no longer do. Early on, people were hired via trial periods. Over time, we did not find this approach scalable. We now have a fairly typical interview process.

We do have an extremely high bar. When choosing between hiring the wrong person or not hiring at all, we’d much rather not hire! For new joiners, we emphasize the importance of hitting the ground running. We want to see a positive impact in the first days, weeks, and months.’

Kagi

Here’s the engineering process at Kagi, as explained by Zac Nowicki:

‘We are ruthless in solving "papercut" pain points for our users on a weekly basis. We win so much favor with users when they report something, then wake up the next day and it’s fixed. It brings users delight, they tell their friends, and it usually doesn't take long for us to do. Everyone wins!

‘Managing larger developments has been much more of a challenge. Getting everything flowing smoothly from specification, design, and implementation is incredibly hard, with the odds against us; such as being a fully remote team spread across every major timezone.

‘We adopt a "marble-chiseling" approach of shaping things with targeted hits, like a sculptor uses their chisel. This is how it works:

Devs start out with a high-level spec, and own some large slice of the work

Devs largely self-manage their work

Reporting is done via two or three syncs throughout the week to keep successes and roadblocks as visible as possible

‘Our approach to getting stuff done is to do the most basic thing, then iterate to the next level of depth. Then repeat.

‘Process-wise, we use:

"Checkpoint" standups: a few throughout the week, to keep things grounded.

"Workspace" voice channels. Throughout the day, we have voice channels people can sit in for virtual "coworking." Sometimes this leads to collaboration, other times it's quiet. Still, we’ve found that even when working in silence, the "body doubling" effect – knowing that others are in the same channel – can be quite helpful for staying focused.

‘Trunk-based development: we rapidly integrate into a single main branch as frequently as possible. This comes with a few more approaches:

Aggressively feature flag WIP things

Refuse to work with long-lived development branches.

‘We aim to keep everyone on the same page, away from the "Git paperwork" of having to deal with complex merges.

‘As an added benefit, if you break something on the backend which goes under the radar, it’s not uncommon for someone else like a frontend developer to spot the issue. This is a lot better than what happens with long-lived branches. We think that changes stagnate by being siloed in branches until they’re "perfect", which is more harmful.

‘Linear: we currently use Linear for our overarching task & project management.’

6. Product milestones

Some notable milestones for Perplexity, and Kagi, to date:

Perplexity

Building the search index (started late 2023; ongoing)

Opening up the Perplexity API (October 2023)

Fine-tuning their own LLM models (November 2023: first launch of PPLX models)

Launching the discover feed (early 2024)

Launching Shop Like a Pro (November 2024)

Perplexity followed a smart strategy. Alex Lang elaborates:

‘Early on, it was easy to dismiss Perplexity as “just a wrapper.” And there was truth in this categorization, back then; the initial launch used third-party search results and AI models. However, people underestimated the value of this strategy.

‘As a product-led company, we wanted to get in front of real users and iterate rapidly. The fastest way to do that was to use third-party technologies. Once we understood our users better, we got to work on building:

Our own search index that matches our needs

Our own AI models that work according to our use cases

‘This “get in front of real users as soon as possible” approach remains ingrained in our engineering culture to this day. Once we’ve learned enough, we build the enduring moat that will allow us to scale.”

‘Once we had our own search index and models, we created an API to share our technology with others. The initial goal was primarily to speed up some internal work, but we knew that the same things that helped us internally, would help other developers. Since then, it's been fun to see how partners and independent developers have put our API to use.

‘Finally, a key milestone has been launching complimentary products to the original Answer Engine; honestly these could be a startup in their own right! Our users are curious, and the Discover feed has been a delightful way to satisfy that curiosity. While the Discover feed could stand on its own as a product, its true value has been its powered growth for the core Answer Engine. Our recent “Shop Like a Pro” that allows users to go from question to buying a product in one click, is a large-enough endeavour to be its own product. But this is just the first step in our evolution from an Answer Engine to an Action Engine.’

Kagi

Major product milestones:

Building Kagi Search (2022)

Launching The Assistant: a baseline LLM chat interface (2024)

Lots of small projects shipped on the side: like FastGPT, Universal Summarizer, the Small Web index, and the brand new Kagi Translate (2023-2024)

What’s next: integration of all these things, and looking for ways to have them talk to each other in ways that make sense and feel natural.

Zac has been part of the core team since the early days, and he reflected on the journey, so far. It’s really nice to hear a first-hand account of a successful product launch:

‘I am unsure anything will ever top the magic of our launch day in 2022. The months and weeks leading up to that were learning how Stripe works, designing our database schemas to hopefully last, and doing our damnedest to make sure it didn’t immediately fall flat when the clock struck midnight.

‘It's all simple strokes, but done under pressure, like:

A cloud function to catch Stripe events

Storing as little information as possible in our tables

Fallback logic so that if the Stripe event handler ever fails, we wouldn't go bankrupt thanks to incorrectly billing or refunding users

Design it with multi-user billing accounts in mind, which was only an idea at the time

‘It's not perfect and has its quirks, but it has largely been unchanged and has carried us to where we are today at ~36,000 paying customers.

‘There were fewer than five of us, each owning a slice in full depth. A formative moment for our core team (myself included), was when we taught ourselves what we could do with so little, considering the giants around us. Taking minimal dependencies, knowing exactly every risk we were taking.

It was totally unforgettable. I hope we can pull it off again.’

7. Unique challenges of search engine engineering

What are the biggest engineering challenges in building a search engine, compared to other systems the team has worked on?

Perplexity

Alex says:

‘The biggest challenge in building an Answer and Action Engine is ensuring we provide a futuristic experience, in a way that wows users, while covering all the basics a user expects from a search engine. In other words, it’s about figuring out the right ways to change up user behavior.

In the 1990s, the search experience was rapidly changing and users had not formed habits, but since then the search engine experience has been remarkably stable. So we constantly have to find a way to delight users with a surprising new experience that leverages recent technologies, while also rounding out the full product experience to cover all the tiny habits people have developed and expect to be present, in order to be satisfied with a search experience.’

Kagi

Zac reflects:

“The major difference for me is that this project connects with people like nothing else I've ever worked on.

It involves caring about details and edge cases in ways – and sometimes on such a small scale – that you wouldn't ever think of, usually. Using the publicly available APIs of other search engines, you could make something that walks and talks like Kagi; but what no one else has is the meticulous shaping of countless small rules and conditionals that keep the cruft (poorly designed, overly complicated, unwanted code) out of our results.

There's no "big secret" to what we do; we've simply put the hours into this marathon that no one else has, while staying true to our mission and value proposition to our customers, and no one else.”

Takeaways

These two startups are both in search, but are so different from each other:

Perplexity is VC-funded, growing rapidly in usage, hiring more aggressively, and launching new products at rapid speed.

Kagi: no VC funding, offering only a paid service, growing their team slowly, and being thoughtful about launching new features.

These are the most interesting points I learned about each startup:

Perplexity: hire for product sense, and prioritize in-person work. Perplexity’s engineering team emphasizes how important “product sense” is: it’s something they explicitly look for during the hiring process.

Kagi: don’t be afraid to build custom systems, or use lesser-known tools. Kagi is the first startup I’ve heard of which uses the Crystal programming language. The engineering team is unafraid to build novel systems if they decide doing so helps them get things done: this is how they built the backend, based on the Flow Based Programming methodology.

Both startups give broad ownership to engineers. Perplexity and Kagi each share the characteristic of giving engineers broad ownership and autonomy. I get the sense there is no heavy product layer at either company; engineers are encouraged to understand customers, the product, and come up with product ideas which they then build.

Both companies know they need to build a more pleasant, better search product than Google Search offers: it’s not easy, but the rewards for succeeding could be spectacular.

Each startup is building a challenger product to Google Search at a time when the Big Tech giant looks vulnerable. Will Google Search evolve to compete more with the likes of Perplexity, by becoming an “answer engine” while cannibalizing its ads revenue? Will it put customers first, and offer a paid product without ads? Or could it find itself “stuck” by being addicted to the hundreds of billions in ads revenue, thereby allowing competitors to overtake it?

Competition is great for the tech ecosystem, and challengers to Google in the search market are much needed. I hope you enjoyed learning about how these two startups operate. Best of luck to the Perplexity and Kagi teams!

As a paid subscriber, if you’d like to try out their paid products — without needing to enter your payment details — you can do so here.

If you enjoyed this deepdive: you might appreciate deepdives about about Meta, Amazon, Stripe, OpenAI, Figma and several other tech companies.

Monday, 27. January 2025

The Pragmatic Engineer

Get free access to Perplexity Pro and Kagi Ultimate

New perk for paid The Pragmatic Engineer subscribers

Hi, this is Gergely with a bonus issue of the Pragmatic Engineer Newsletter — with a special announcement. Note that this is a personal recommendation — and a deal I initiated with two tools I’ve been using as a paid customer to replace my Google Search usage the last year. It is not a paid advert: I have not received any monetary or other compensation for sharing this offer. I have no affiliation with either of the companies mentioned below. See more in my ethics statement. It’s the first-ever such announcement since the start of The Pragmatic Engineer three years ago — and I do not plan to do these frequently.

I’m excited to share a unique perk for all paying subscribers to The Pragmatic Engineer. Starting today, you now get access to:

Perplexity Pro for 12 months (worth $200)

Kagi Ultimate for 3 months (worth $75)

You don’t need to share credit card details or payment information to access this deal.

Get Perplexity and Kagi codes for free

This deal only applies to new Perplexity and Kagi customers. Cancelling a newsletter subscription deactivates the code supplied.

If you’re not yet a paid subscriber to The Pragmatic Engineer, you can upgrade here.

How did these offers come about?

Some background: for about a year, I’ve been using Kagi Professional as my default search engine, after deciding to drop Google Search. Meanwhile, for deep research and highly nuanced web search, my choice is Perplexity Pro.

I want to mention that I haven’t been paid to mention these startups – in fact, I reached out to them! I’m actually a longterm user of both products, and want to give subscribers the opportunity to discover them, too. So, I approached the companies about offering trials.

I’m pleased to say that Kagi and Perplexity were each open to offering multi-month free trials to subscribers of The Pragmatic Engineer. For Kagi, it’s the first time they’ve made such an offer via a third party.

Let’s tackle the elephant in the room: why would you pay for search? I certainly never thought I would. But the reason I do so today, is that I’m tired of being “the product” for search engines. Every time I execute a search, I have to scroll through sponsored results that are mixed into organic ones. I also have a nagging sense that search engine results are degrading over time. The likes of Google care more about maximizing ad revenue than they care about serving up high-quality, helpful search results.

Finally, as a tech professional and someone who believes in the benefits of competitive markets, it’s refreshing to see startups challenge the monopolistic Big Tech dominance of search with new, alternative approaches. Perplexity is barely two years old, and already a challenger to Google. And Kagi offers unusual transparency behind their exact usage numbers and customer numbers by sharing realtime platform stats.

Perplexity has built a product that feels like a new type of search; one which delivers research to your fingertips via a search engine, complete with references (links) about where the information has been sourced from. This lets you double check how legitimate the sources are, and so using such a tool can strengthen the credibility of your work.

Meanwhile, Kagi is building a privacy-first, user-first version of Google search without VC funding or ads. The results it serves feel much more like “hits”, than the “misses” I’ve come to expect from Google. Check out the Kagi team’s view on the real cost of “free search.”

What you get from Perplexity Pro and Kagi Ultimate

What you get with Perplexity Pro:

Pro searches. A Pro search conducts thorough research to provide in-depth, accurate responses to questions. It’s particularly useful for summarising, data analysis, debugging, and content generation, making it the perfect tool for developers and data scientists. More about Pro search features.

Powerful AI models. Search using a choice of advanced AI models, each with its own unique strengths. Choose from GPT-4 Omni (advanced reasoning), Claude 3 Sonnet and Haiku (natural-sounding responses and file uploads), Sonar Large 32k (conciseness and accuracy). You can even use the new DeepSeek R1 reasoning model (hosted with Perplexity) and OpenAI o1 reasoning model.

Document Analysis: Upload text and data files to search the web and also internal knowledge bases.

What you get with Kagi Ultimate:

Unlimited Kagi searches. Lightning-fast, no ads and no tracking, and the ability to block domains. Popular domains users block include Pinterest, Daily Mail, and Quora.

The Assistant access. The Assistant by Kagi combines top large language models (OpenAI, Anthropic, Meta, Google and Mistral) with optional results from Kagi Search, making it the perfect companion for creative, research, and programming tasks. More details about The Assistant.

Get Perplexity Pro and Kagi Ultimate

Next up: deepdive on both startups

Tomorrow, we publish a deepdive on the engineering cultures of Perplexity and Kagi. Both these startups are building alternatives to Google Search, and each has its own distinct approach and engineering culture. Stay tuned!


@_Nat Zone

1月28日(火)はPrivacy by Design Conference

Privacy by Design Conferenceとは Privacy by Design Conferenceは、Data Privacy Day (1月28日)頃に開催する国際カンファレンスです。 プライバシーに関わる、文化、法律、テクノロジー、ビジネス、オペレーション…
Privacy by Design Conferenceとは

Privacy by Design Conferenceは、Data Privacy Day (1月28日)頃に開催する国際カンファレンスです。

プライバシーに関わる、文化、法律、テクノロジー、ビジネス、オペレーションなどのさまざまな立場の方が、多様な視点で対話を行います。

ことしは日比谷国際ビル コンファレンス スクエアにて1月28日におこなわれます。わたしもひとつのセッションのモデレータをさせていただきます。

14:35〜15:20

デジタルIDによってどのような社会を実現するのか(8C会場) (英語。日本語字幕)
Session:「Secure and Safety Service Design 〜Designing with Trusted Digital ID〜」

このセッションでは、モデレーターとパネリストが国境を越えたデジタルIDプロジェクトに関するトピックについて議論します。現在のユースケースを基に、信頼できるデジタルIDスキームに基づいたセキュリティと安全性に関する課題についてお話します。

Reference Link: DNP and MUFG Aiming to Commercialize Digital IDs

モデレーター: MyData Japan 理事長 崎村 夏彦 日豪クロスボーダー相互運用性ワーキンググループ メンバー 岡本 凜太郎 氏 Meeco CEO兼創設者 カトリーナ・ダウ 氏 カンファレンスの詳細について

カンファレンスの詳細は、オフィシャルサイトからご覧になっていただけます。

それでは、現地にてお会いしましょう。

Saturday, 25. January 2025

Doc Searls Weblog

What Works After a Disaster Happens?

When Hurricane Helene hit Western North Carolina, the Swannanoa River rose three storys above its shores, all but erasing the town named after the river, and leaving hundreds homeless. But the challenge for Swannanoa was not just recovery. It was regeneration. For that, Swannanoa’s residents formed new kinds of partnerships and problem solutions that could […]

When Hurricane Helene hit Western North Carolina, the Swannanoa River rose three storys above its shores, all but erasing the town named after the river, and leaving hundreds homeless.

But the challenge for Swannanoa was not just recovery. It was regeneration. For that, Swannanoa’s residents formed new kinds of partnerships and problem solutions that could prove a model of what to do after disasters hit communities anywhere—such as Altadena and Pacific Palisades, on which I’ve been reporting lately in my News Commons series.

Kevin Jones, one of the founders of SOCAP and curator of Neighborhood Economics, is a Swannanoa resident reporting on what is working in real time. This next Wednesday, January 29 at Noon EST, Kevin will be doing exactly that in our Salon Series at Indiana University—and live on the Web.

If you care about recovery and regeneration for your neighborhood—or anybody’s—after disaster strikes, this is a one-hour required course. As a salon, it is participatory. Come with questions, answers, or helpful stories of your own. Let’s teach and learn together, for the sake of a world larger than each of our own.

Go here for more information and the Zoom link for the salon.

Photo by Bill McMannis.

Thursday, 23. January 2025

The Pragmatic Engineer

The Pulse #121: Netflix’s remarkable turnaround

In two years, the streaming giant’s valuation increased by 4x. Also: learnings from a managed database service losing customer data, and more.

The Pulse is a series covering insights, patterns, and trends within Big Tech and startups. Notice an interesting event or trend? Send me a message.

Today, we cover:

Industry pulse. TikTok’s gamble pays off, Stripe and Meta do 4-5% layoffs, Reflections on a month of using Devin, Hundreds of billions in AI infra investments, Amazon’s AI models fail to impress, Google allows malware Homebrew install links as sponsored Search results, and more.

Netflix’s remarkable turnaround. In two years, Netflix went from growth stalling – and the company’s valuation in freefall – to all-time-high user numbers and valuation. The standout stock price growth means that Netflix employees who opted to take a part of their compensation as stock options most certainly did better than those opting for all-cash packages.

Managed database service loses customer data. Database-as-a-service Turso lost customer data thanks to no backups running on beta service offerings. There are learnings not just for the startup – launching a service without backups running doesn’t feel like a responsible move – but also for all engineering teams. Don’t assume your vendor does backups: validate that they do.

1. Industry Pulse TikTok’s gamble pays off?

Read more


Doc Searls Weblog

And Now the #HughesFire

Twenty-fourth in the News Commons series Eigth on the #LAfires 7:35 am January 23, 2024—It’s morning now. The Hughes Fire is 17% contained but no longer interesting. The Sepulveda Fire broke out last night along the 405 freeway. It stopped at forty acres, and doesn’t matter much now. Here’s the path of one fire helicopter […]

Twenty-fourth in the News Commons series
Eigth on the #LAfires

7:35 am January 23, 2024—It’s morning now. The Hughes Fire is 17% contained but no longer interesting. The Sepulveda Fire broke out last night along the 405 freeway. It stopped at forty acres, and doesn’t matter much now. Here’s the path of one fire helicopter shuttling between the two fire sites:

So reporting is now off the fires themselves. Let’s look at these six screen grabs—

—and put them where they go on this table:

The rows are requirements of story-telling. The columns are stages of disaster news coverage.

In these screen grabs—

Channel 4 is doing a mix of live reporting and human interest, focusing on how some characters (school kids) are doing nice things for firefighters. Channel 5 is doing live reporting from the Sepulveda Fire, which is pretty much out. Channel 7 has a weather forecast, for rain, which is long overdue and will put a damper on the fires. (An aside: my wife observes that “weather people on TV are either crusty old dudes or hot young women.”) KCAL/9 has an interview with a fire official working toward coming to an understanding while earlier footage (recalling live coverage) shows to his right. KTTV/11 (the Fox channel) is showing some public service stuff mixed with promotional jive. It’s between news segments and regular programming, so not news at all. Telemundo (Channel 52) is reporting on a church recovering from the Eaton Fire. That’s a mix of live reporting and human interest. Blame is not in any of these. If you want some of that, here’s the latest from the LA Times.

What I’m trying to do with this table is show how the requirements of a story (character, problem, movement) are met by the four stages of story-telling by journalists. Every story you see, hear, or read will play across that grid. Of course, none matter more than #4, which is more complicated and less interesting than the other three stages. But, that is where most facts will go. For more on that, see How Facts Matter.

8:10 pm—The LA Times reports that the I-5 is open again. (That link goes to their ongoing coverage.) Here is what CAL FIRE says about current fires and their containment:

Note that the Palisades and Eaton Fires are still not fully contained, though we haven’t been worried about them in a while. The same will happen with the Hughes Fire. While it is currently 0% contained, that does not mean it hasn’t been slowed or halted along stretches of its perimeter. Full containment means firefighters are sure the fire will not spread beyond control lines. And they are very cautious about the numbers they share. The winds later tonight and tomorrow are still a concern, and thousands of people remain evacuated.

5:40 pm—I just heard on one of the TV channels that The I-Five, aka The Grapevine, is likely to be opened again soon. All the channels sound more optimistic about the paths of the fire. Smoke is also flowing upwards rather than sideways, so that’s less of a concern as well.

Night has also fallen, meaning the flames are far more dramatic:

Great TV, but not more to worry about.

3:45 pm—Watching the Los Angeles TV stations (each with a tab in my browser) cover the Hughes Fire. I have them arranged by channel number. (Note that NBC’s 4 and Telemundo’s 52 are co-teamed. One reporter’s mike says NBC4 on two sides and T—for Telemundo—52 on two sides.) Including the above, here are all the media we’re watching, reading, and listening to:

KNBC/4 KTLA/5 KABC/7 KCAL/9 KTTV/11 KVEA/52 LA Times LAist #HughesFire on Bluesky #HughesFire on Facebook #hughesfire on Instagram #HughesFire on Threads #HughesFire on X

I’m also watching aerial fire fighting (aircraft, paths) on adsbexchange.com and FlightRadar24. Linked images from each:

On the plus side, the concerns here are for outer suburbs and exurbs on a landscape of hilly grassland and chaparral. Compared to the steeper San Gabriels (such as those above Pasadena and Altadena), the civilized stuff is relatively defensible, with fire breaks on the ridges and bare spaces around at least some of the housing developments and other collections of structures. Winds are not too strong for aircraft, which have been able to drop water and lines of retardant. It helps that Castaic Lake itself is an enormous fire break, as well as a convenient source of water to scoop up and drop on the fire.

So, while there is lots of danger here, especially if the winds get too high for aircraft to keep flying, I expect the fight against the HughesFire to succeed.

If we can back off the edges of our seats a bit, it should be interesting to look at coverage of the #HughesFire through the prism of story. Again, the three requirements are:

Character(s) Problem(s) Movement

And the four stages of coverage are:

Live reporting Human interest Blame Coming to an understanding

At this stage, the main character is the Hughes Fire, which is also the problem. And it’s moving. Of course all the media like to bring the human characters in: a resident, a fire captain, a county official, a store owner. Not long ago one of the TV stations interviewed an insurance guy holding a book full of checks he was ready to write to policyholders. That’s also what we get with the mix of the first and second kinds of coverage. No blame yet, but (as they say in social media reels) wait for it. Understanding, of course, will take the longest. Here’s a screen grab from Google Maps that will tell at least some of what isn’t much of a story yet (not much character or movement), but there is an expression for it what you see: the Wildland-Urban Interface (WUI). Read about it at that link. See it here, in the path of the Hughes Fire if it isn’t stopped:

And here is a wider view of the whole region:

With the exception of the Chiquita Canyon Landfill, all of the bare areas are housing developments. All of the housing and industrial developments used to be bare areas. And all of both used to be desert mountain grasslands and chaparral. Throughout the natural history of the area, at least since the end of the Pleistocene, burns from natural causes cleared off the land about every twenty-five years or so. And all the mountains were produced by earthquakes. I’ll write more about all of this in my next post.

Wednesday, 22. January 2025

The Pragmatic Engineer

Observability: the present and future, with Charity Majors

In today's episode of The Pragmatic Engineer, I'm joined by Charity Majors, a well-known observability expert – as well as someone with strong and grounded opinions.
Stream the Latest Episode

Available now on YouTube, Apple and Spotify. See the episode transcript at the top of this page, and a summary at the bottom.

Brought to You By

Sonar — Trust your developers – verify your AI-generated code.

Vanta —Automate compliance and simplify security with Vanta.

In This Episode

In today's episode of The Pragmatic Engineer, I'm joined by Charity Majors, a well-known observability expert – as well as someone with strong and grounded opinions. Charity is the co-author of "Observability Engineering" and brings extensive experience as an operations and database engineer and an engineering manager. She is the cofounder and CTO of observability scaleup Honeycomb.

Our conversation explores the ever-changing world of observability, covering these topics:

• What is observability? Charity’s take

• What is “Observability 2.0?”

• Why Charity is a fan of platform teams

• Why DevOps is an overloaded term: and probably no longer relevant

• What is cardinality? And why does it impact the cost of observability so much?

• How OpenTelemetry solves for vendor lock-in

• Why Honeycomb wrote its own database

• Why having good observability should be a prerequisite to adding AI code or using AI agents

• And more!

Takeaways

My biggest takeaways from this episode:

1. The DevOps movement feels like it’s in its final days, having served its purpose. As Charity put it:

“It’s no longer considered a good thing to split up a dev team and an ops team to then collaborate, right? Increasingly, there are only engineers who write code and own their code in production. And I think this is really exciting. We can understand why Dev versus Ops evolved, but it was always kind of a crazy idea that half your engineers could build the software and the other half would understand and operate it.”

Indeed, I cannot name any team at startups or at large tech companies that has a dedicated Ops team. While there surely exist such companies in small pockets – think of more traditional companies operating in highly regulated environments like finance or healthcare – this setup feels like the exception rather than the norm.

2. Lots of people get dashboards wrong! Charity doesn’t think that static dashboards are helpful to engineering teams at all. In fact, misusing dashboards is one of the most common observability practices she sees:

“Unless your dashboard is dynamic and allows you to ask questions, I feel like it's a really poor view into your software. You want to be interacting with your data. If all you're doing is looking at static dashboards, I think it limits your ability to really develop a rich mental model of your software. And this means that there are things that you won’t see; because you did not graph it on your dashboard!”

3. Observability will be especially important for AI use cases in these ways:

o11y for LLMs: to get data on how they behave and to be able to debug behaviors. This is relevant for teams building and operating AI models.

o11y for code generated by AI: the generated code should have the right amount of observability in place. Once the code is deployed to production, developers need to be able to get a sense of how the code is behaving there!

GenAI means that a lot more code will be generated via LLMs – and all this code needs observability!

The Pragmatic Engineer deepdives relevant for this episode

How Uber Built its Observability Platform

Building an Observability Startup

How to debug large distributed systems

Shipping to production

Timestamps

(00:00) Intro

(04:20) Charity’s inspiration for writing Observability Engineering

(08:20) An overview of Scuba at Facebook

(09:16) A software engineer’s definition of observability

(13:15) Observability basics

(15:10) The three pillars model

(17:09) Observability 2.0 and the shift to unified storage

(22:50) Who owns observability and the advantage of platform teams

(25:05) Why DevOps is becoming unnecessary

(27:01) The difficulty of observability

(29:01) Why observability is so expensive

(30:49) An explanation of cardinality and its impact on cost

(34:26) How to manage cost with tools that use structured data

(38:35) The common worry of vendor lock-in

(40:01) An explanation of OpenTelemetry

(43:45) What developers get wrong about observability

(45:40) A case for using SLOs and how they help you avoid micromanagement

(48:25) Why Honeycomb had to write their database

(51:56) Companies who have thrived despite ignoring conventional wisdom

(53:35) Observability and AI

(59:20) Vendors vs. open source

(1:00:45) What metrics are good for

(1:02:31) RUM (Real User Monitoring)

(1:03:40) The challenges of mobile observability

(1:05:51) When to implement observability at your startup

(1:07:49) Rapid fire round

A summary of the conversation

For those of you more interested in reading a summary of the conversation — or skimming over it — see it here. Takeaways follow after the summary.

Observability (o11y) basics

Observability is about understanding software, specifically the intersection of code, systems, and users.

It is not just about errors, bugs and outages; it is also about understanding the impact of code.

Observability is a tool that is critical for development feedback loops, and is not just an operational tool.

The goal of good o11y is to help engineers understand their software in the language of the business.

Engineers should be able to tie their work back to top-level goals, and explain how their work translates to the business.

Sampling is an important lever, contrary to the idea that every log is sacred.

‘metrics’ vs ‘Metrics’

We need to distinguish between metrics (small 'm') as a generic term for telemetry and Metric (capital 'M') as a specific data type, a number with appended tags.

The Metric data type is limited because it doesn't sort any contextual relationship data.

The Three Pillars Model

The three pillars model of observability is this: metrics, logs and traces.

Many vendors sell products for each of these pillars – as well as for all of them

The problem with the Three Pillars Model is that every request that enters a system is stored multiple times, in different tools (metrics, logs, traces, profiling, analytics).

There is little to connect the data points; engineers are left to manually correlate the data.

The cost of following this model is high: it’s because storing the same data in multiple tools and databases is very high!

What is Observability 2.0?

Observability 2.0 moves away from multiple sources of truth to unified storage.

With unified storage, there are no dead ends: engineers can click on a log, turn it into a trace, visualize it over time, and derive metrics and SLOs from it. They can then see which events are violating SLOs.

Good observability powers developer feedback loops. It allows engineers to visualize the CI/CD as a trace and see where tests are breaking. The goal is to keep the time between building code and seeing it in production as small as possible.

Observability is shifting from being an ops tool, focused on errors and downtime to something that supports the entire development cycle.

Modern engineering practices + good observability is where the real value is.

Modern engineering practices such as feature flags, progressive deployment, and canary releases, along with observability, give engineers confidence to move quickly and safely.

Observability acts as a translation layer, enabling engineers to reason about their work and tie it back to top-level business goals.

The dream goal? To be able to explain and understand our work in the same language as everyone else: how much financial value is this piece of code generating?

Why is observability hard, anyway?

Engineers have to think about what they might need to understand in the future. Like during an incident at 2:00 AM!

Software is hard. Observability is the first line of defense.

Tools have historically required engineers to be masters of multiple disciplines, e.g., they had to convert their code into physical resources such as CPU and RAM usage.

Cost of Observability: why is it so expensive?

One reason observability is expensive: the multiplier effect. The same data is stored multiple times. One common criticism of The Three Pillars model.

Cardinality: another thing that can make it a lot more expensive

Cardinality means to the number of unique items in a set. Unique IDs, such as request IDs, have the highest possible cardinality.

Big 'M' Metrics tools are designed to handle low-cardinality data (Observability 1.0 tools)

Adding high cardinality data to metrics tools makes them very expensive.

These days, world-class observability teams spend the majority of their time governing cardinality!

The more unique the data, the more valuable it is for debugging but that also means it costs more.

To solve this, the industry has to move away from tools backed by big 'M' metrics, to those using structured data where high cardinality can be stored.

The wider the logs (the more context attached to each event), the better the ability to identify outliers and correlate data.

Is Observability 1.0 getting in the way or building what engineering needs – at a lower cost?

The model for traditional observability tools does not fit the needs for the data that engineers actually need.

Metrics were optimized for a world where resources were very expensive, but now that storage and compute is cheaper, it's possible to store more data and slice and dice in realtime.

A column-based data store is needed to use flexible structured data without having to define indexes and schemas in advance.

OpenTelemetry

What is OpenTelemetry (OTel)?

A collection of APIs, SDKs and tools to make telemetry portable and effective.

It provides a framework for consistent telemetry with consistent naming and semantic conventions, allowing vendors to do more with the data.

OTel overtook Kubernetes as the number one project in the CNCF.

The goal of Otel is to allow engineers to instrument code once, and then point the data to whatever vendor is chosen.

OTel forces vendors to compete on the basis of their excellence and responsiveness.

Using OpenTelemetry is a safe bet for companies to enable portability of data between vendors.

It also gives the option of negotiating with vendors, because of the ability to switch!

Common mistakes with observability

Introducing it too late. Engineers feel like they don't need observability until they are in production and things start breaking.

Using dashboards wrong.

Engineers can get too attached to dashboards.

Dashboards, unless they are dynamic and allow you to ask questions, are a poor view into software.

Not using SLOs and error budgets enough.

SLOs (Service Level Objectives) should be the entry point, not dashboards.

SLOs are the APIs for engineering teams.

SLOs provide a budget for teams to run chaos engineering experiments.

SLOs are a hedge against micromanagement, because when teams meet their SLOs, the way they spend their time is not important.

SLOs allow teams to negotiate for reliability work if they are not meeting their obligations.

SLOs need to be derived from the same data as debugging.

Other topics

Why did Honeycomb build their own database?

At Honeycomb, Charity decided to build their own database despite the common wisdom to never do it. ClickHouse wasn't a thing back then: if it was, perhaps they would have not built it.

The database, called Retriever, is a column-based store. The query planner runs using Lambda jobs. Data is aged out to S3 after being written to SSDs.

It’s been a win, looking back now. The data model is custom, and being able to iterate on it has been a force multiplier.

Observability and AI

AI intersects with observability in three areas:

1. When building and training models

2. When developing with LLM

3. When dealing with code of unknown origin produced by AI

Good AI observability can't exist in isolation; it must be embedded in good software observability.

The inputs for AI models come from different services, data and humans and this creates a trace shaped problem

Build vs Buy vs Open Source

The main trend across the industry: consolidation. Companies try to control their bills.

Most companies use vendors and don't want to deal with observability tools breaking at 2am.

Metrics still have a place, but most companies need to move from 80% metrics/20% structured data to the reverse.

Frontend and mobile observability

Silos are created when different teams use different tools.

A unified view from mobile/browser to database is powerful.

Mobile is different because the build pipeline is different, and the inability to fold mobile into software development best practices.

Resources & Mentions

Where to find Charity Majors:

• X: https://x.com/mipsytipsy

• LinkedIn: https://www.linkedin.com/in/charity-majors/

• Blog: https://charity.wtf/

Mentions during the episode:

• Honeycomb: https://www.honeycomb.io/

• Parse: https://parseplatform.org/

• Ruby on Rails: https://rubyonrails.org/

• Christine Yen on LinkedIn: https://www.linkedin.com/in/christineyen/

• Scuba: Diving into Data at Facebook: https://research.facebook.com/publications/scuba-diving-into-data-at-facebook/

• Three pillars: https://charity.wtf/tag/three-pillars/

• Unified storage: https://charity.wtf/tag/unified-storage/

• “Every Sperm is Sacred”:

• Peter Borgan on LinkedIn: https://www.linkedin.com/in/peterborgan/

• Datadog: https://www.datadoghq.com/

• Vertica: https://en.wikipedia.org/wiki/Vertica

• Ben Hartshorne on LinkedIn: https://www.linkedin.com/in/benhartshorne/

• Cardinality: https://en.wikipedia.org/wiki/Cardinality_(data_modeling)

• COBOL: https://en.wikipedia.org/wiki/COBOL

• Ben Sigelman on LinkedIn: https://www.linkedin.com/in/bensigelman/

• OpenTelemetry: https://opentelemetry.io/

• Kubernetes: https://www.cncf.io/projects/kubernetes/

• SLOs: https://docs.honeycomb.io/notify/alert/slos/

• ClickHouse: https://clickhouse.com/

• Why We Built Our Own Distributed Column Store: https://www.honeycomb.io/resources/why-we-built-our-own-distributed-column-store

• "Why We Built Our Own Distributed Column Store" by Sam Stokes:

• "How we used serverless to speed up our servers" by Jessica Kerr and Ian Wilkes:

• Inside Figma’s Engineering Culture: https://newsletter.pragmaticengineer.com/p/inside-figmas-engineering-culture

• How to debug large, distributed systems: Antithesis: https://newsletter.pragmaticengineer.com/p/antithesis

• Observability in the Age of AI: https://www.honeycomb.io/blog/observability-age-of-ai

• Grafana: https://grafana.com/

• Prometheus: https://prometheus.io/

• What Is Real User Monitoring (RUM)?: https://www.honeycomb.io/getting-started/real-user-monitoring

• Crashlytics: https://en.wikipedia.org/wiki/Crashlytics

• Square wheels comic: https://alexewerlof.medium.com/on-reinventing-the-wheel-201148f74642

• WhistlePig Whiskey: https://www.whistlepigwhiskey.com/

• George T. Stagg bourbon: https://www.buffalotracedistillery.com/our-brands/stagg.html

• Stagg Jr.: https://newportwinespirits.com/products/stago-jr-ksbw

• Fluke: Chance, Chaos, and Why Everything We Do Matters: https://www.amazon.com/Fluke-Chance-Chaos-Everything-Matters/dp/1668006529

Production and marketing by https://penname.co/. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.


Phil Windleys Technometria

Zero Trust, Least Privilege, and Just-in-Time Access

Security professionals have long taught that organizations should limit the access individuals have in computer systems to just those privileges necessary to perform their job.

Security professionals have long taught that organizations should limit the access individuals have in computer systems to just those privileges necessary to perform their job. This is known as the principle of least privilege. The problem is that knowing this is a best practice and putting it into practice are two different things. Traditionally, organizations have used access control lists (ACLs) and role-based access control (RBAC) based on groups to authorize activities. These methods are static, requiring that lists or groups be updated manually as people move between roles or leave employment. When this is extended to partners, suppliers, and other services, the problem is that much worse. And excess standing privileges are a real security risk.

Standing privileges are characterized by persistent access regardless of whether the person is using the resource or not, predefined scope where role is used to define broad access, and minimal oversight with little monitoring and accountability. Standing privileges increase the attack surface, letting attackers exploit broad permissions without further escalation. In addition, over time people accumulate permissions beyond what they need to perform their current job, a situation known as privilege creep.

In an ideal world, least privilege is like a shrink wrap, constantly adjusting the access perimeter as the needs of the employee change. Sometimes they expand and the shrink wrap expands to seamlessly grant any access to needed perform a job. Sometimes the needs shrink and the access perimeter of the employee contracts as well. By limiting access to just that necessary to perform tasks, least privilege ensures that the attack surface that an attacker can exploit is as small as possible.

Zero Trust

Sometimes it's easy to get least privilege and zero trust confused. Zero trust is an overall security framework that requires continuous trust verification. Zero trust is a strategic, overarching trust model for an entire organization. Least privilege, in contrast, is more tactical, determining who can access what and when they can do it.

To see how least privilege fits into a zero trust strategy, consider a database administrator (DBA). Least privilege might set access controls such that the DBA can manage databases, but cannot view customer data stored within them. If their credentials are compromised, the attacker cannot steal sensitive information because the DBA’s privileges are tightly scoped. Zero trust relies on the DBA's access being valid, but might also check for unusual activity such that if the DBA appears to be accessing the database from a new location or at an unusual time, access is curtailed until the DBA is re-authenticated.

As the example shows, least privilege is an important part of zero trust, but only part. Other tactics that play in a zero trust strategy include device management, multi-factor authentication, and segmenting applications and processes (i.e., microsegmentation) to make fine-grained access control possible. Still, least privilege is a core part of a zero trust strategy. And least privilege depends on eliminating standing privileges.

Eliminating Standing Privileges

Recent developments in dynamic authorization have made it easier than ever to eliminate standing privileges. Standing privileges are the result when automatically updating an employee's access in response to changing circumstances is difficult. Modern policy-based authorization systems like Cedar allow organizations to control access though policies that state who can access what and under what conditions. These policies are managed like code, making them easier to manage. More importantly, they can automatically respond to changing circumstances.

For example, the first of the following two Cedar policies forbids anyone to access any resource that's considered "critical" unless they're on a managed device with an acceptable security posture. The second permits employees in the Finance group to access any finance application. These policies work together, so that if the finance application is also a critical resource, then finance employees would also have to be on a managed device with an acceptable security posture. As employees change roles that group is automatically updated from the HR system, growing or shrinking access as needed.

forbid( principal, action, resource in Category::"CriticalResources" ) unless { context.device.security.risk == "Secure" && context.device.security.assessment.overall >= 80 }; permit( principal in UserGroup::"Finance" action, resource in Category::"FinanceApplications" );

While policy-based access control (PBAC) can be used to mimic a role-based access control system, proper system segmentation (i.e. being able to identify finance applications) and device management allows finer-grained access control where employee's actions can be restricted to specific systems and only when their using a company-owned device that is properly secured. Access control can be limited to certain times or from specific locations. All of these reduce the surface area of an employee's access perimeter for better security.

Just-in-Time Access Control

We can shrink the access perimeter even further using just-in-time access control. Just-in-time (JIT) access control is a mechanism that grants users, applications, or processes access to resources only for a limited time and only when it is explicitly needed. This minimizes the risks associated with long-term or persistent access privileges. While the principle of least privilege focuses on ensuring users or systems have the minimum permissions required to perform their roles or tasks, JIT access control refines this further with several other important features:

Time-Bound Privileges:—JIT ensures permissions are time-limited, reducing the window of opportunity attackers have to exploit rarely-used accounts. For example, a developer needing access to a production server might receive elevated privileges only for a specific task and only for a set duration.

Dynamic Privilege Assignment:—Even when policies are evaluated for each access, the permissions they allow are available indefinitely. JIT adds another dimension to the dynamic nature of PBAC where privileges are granted on demand and revoked automatically when no longer needed.

Granular Control:—Dynamic privilege assignment complements PBAC by making access more granular—not just who can access what, but also when and for how long.

JIT access control might, for example, be used to limit access to payroll functions except during the window when payroll is being processed. Another example is in so-called "break-glass" situations where access is granted to production resources in an emergency or in the case of unexpected failure. Other examples use dynamic roles (e.g., on call) to grant access or require a third party (like a manager) to approve access.

These scenarios can fit within a policy-based authorization architecture using mechanisms such as dynamically altering roles or adding information to the authorization request context based on querying other systems or utilizing permission tokens that carry time-based permissions with them. For example, the following policy makes use of an assignment to process payroll in the oncall tracking system to ensure only people with an oncall assignment of "payroll" can process the payroll.

forbid( principal action == "Payroll::Process", resource ) unless { context.oncall.assignment == "payroll" }

For this to work, the authorization agent that creates the request for the policy authorizer has to ensure that the context for the request includes the correct oncall assignment and oncall assignments need to be automated.

Putting it All Together

Zero trust, the principle of least privilege, and just-in-time access work together to create a comprehensive security framework.

Zero trust enables an overarching strategy that mandates systems, resources, and actions be designed such that it is possible to continuously verify every action.

Principle of Least Privilege forms the heart of the zero trust strategy, mandating authentication and authorization systems that can dynamically grant fine-grained access through policy.

Just-in-time authorization augments the authorization system so that permissions can be granted not just based on who and where, but also only when they are needed to perform critical actions.

The well known adage that you can't buy security, applies to zero trust and JIT. There are products and technologies that make just-in-time, dynamic fine-grained access control possible, but besides putting them in place, you must also integrate them, make any necessary changes to other systems, and implement governance, monitoring, and auditing to ensure they work. These are organizational changes that take time, money, and perseverance. Done right, the payoff is not just a reduced attack surface and better security, but more productive employees as well. This may seem counter-intuitive, but poorly implemented, piecemeal security measures put much of the burden for keeping systems safe on employees who deal with tactics like frequent, yet ineffective password changes or requesting, and then waiting for, permissions to do their job.

When dynamic access control with JIT access is thoughtfully implemented, you shift the burden of security from employees to systems that automate protection, making it proactive and intelligent. Reducing friction so that employees can do their job while also enhancing security requires balance and a holistic approach that aligns technology, process, and culture. This transformation requires real effort but offers substantial rewards: resilient, secure systems; empowered employees; and peace of mind.

Photo Credit: Shrink Wrapped Computers from DALL-E (public domain) Prompt: draw a wide format picture of several colorful, shrink wrapped computers and smartphones.

Tuesday, 21. January 2025

The Pragmatic Engineer

Microsoft’s developer tools roots

Big Tech and startups, from the inside. Highly relevant for software engineers and managers, useful for those working in tech.

Ask 10 startups or scaleups if they use the “Microsoft stack”, and I’d be willing to bet that almost none do. By “Microsoft stack”, I mean using any one of C# or F# as a programming language, the .NET framework, ASP.NET for web development, or SQL Server as a database. However, if you asked the same companies if they use one or all of Visual Studio Code, GitHub, Copilot, TypeScript, or npm, then all may reply that they do.

The questions might seem different, but they are in fact almost identical. VS Code, GitHub, TypeScript, npm are all technologies owned and operated by Microsoft which are increasingly popular with startups and modern tech companies, but just don’t have strong Microsoft branding.

The Windows maker is quietly investing more in developer tools than any Big Tech giant. It acquired GitHub for $7.5B in 2018. It likely spent hundreds of millions of dollars per year to develop Visual Studio Code – then and then gave it away for free while upselling some of its services. It also offers GitHub Copilot for $10/month or $100/year, which may currently be a loss-making price point.

So, why is Microsoft investing so much into developer tooling, and why does the rest of Big Tech seem comparatively uninterested in competing in this area? This question has been bugging me, so I attempted to find an answer. In order to properly understand what’s happening today, it’s useful to go back in time to when Microsoft became a highly profitable “dev tools monopoly” once before, in the 2000s.

This deep dive covers the first part of the story, covering:

A programming language interpreter company. Microsoft started out as a company selling BASIC interpreters to various hardware companies.

More and better developer tools. Following the success of MS-DOS and Windows, the company still built developer tools like Microsoft C, QuickC and MFC.

Journal for developers. Microsoft Systems Journal (MSJ). In the same year as going public, Microsoft started a printed magazine for MS-DOS and Windows developers.

Visual C++, a Development System for Windows. Microsoft created this IDE to make it easier to develop apps for Windows.

Visual Studio. The first IDE by the company that supported multiple programming languages.

Microsoft Developer Network (MSDN). Microsoft managed to figure out how to charge a large premium for quality documentation and access to the latest software.

“Developers, developers, developers!” This now-famous chant had more context: Microsoft knew that it needed developers to adopt the newly launched .NET framework, to make it a technology adoption success.

1. A programming language interpreter company

Most people associate Microsoft with the ubiquitous Windows operating system, but the company actually began by creating a language interpreter.

Building a BASIC interpreter in two months

On New Year’s Day in 1975, an advert for a minicomputer appeared on the front page of Popular Electronics, then the world’s most popular electronics magazine. It was for the Altair 8800; a small computer with an Intel 8080 CPU. The price was $439 (around $2,500 today) and the Altair couldn’t do much by itself: it had to be extended with memory (up to 4KB), and additional interface boards needed to be purchased to make it practical to use, like a typing board, cassette tapes, floppy disks, etc. All these were separate purchases, and some weren’t available at launch.

The price was incredibly low for its time. Before the Altair 8800, computers that were equally capable cost several times more, whereas the Altair was accessible to hobbyists. Its manufacturer, MITS (Micro Instrumentation and Telemetry Systems), hoped to sell 200 units, but sold 2,500 units in five months, and the device became the first commercially successful computer.

The ad announcing the Altair 8800 in Popular Electronics

The advert caught the attention of programmers Bill Gates and Paul Allen and Paul Allen, who predicted the device would quickly become popular, and spied an opportunity to develop software for it. They contacted MITS offering to develop an interpreter for a popular programming language called BASIC (Beginner's All-Purpose Symbolic Instruction Code). It’s a simple enough language:

INPUT "Enter the value of n: ", N IF N <= 1 THEN PRINT N : END A = 0 B = 1 FOR I = 2 TO N C = A + B A = B B = C NEXT I PRINT "The", N, "th Fibonacci number is:", B END

BASIC code to calculate the nth Fibonacci number

Allen and Gates did not have an Altair computer, but realized time was of the essence; so Allen wrote an Altair simulator based solely on the Intel manual for the 8080 chip (!!) Meanwhile, Gates wrote the BASIC interpreter to run on this simulator. In March, Paul Allen flew to meet the manufacturer, and demonstrated that it worked flawlessly: he loaded the interpreter into the machine, and then proved correctness by typing in simple programs like printing 2+2, sums of numbers, squares of numbers, and so on.

MITS was interested in distributing BASIC with the Altair, as the software would make their kit more useful for developers. This was the point when Allen and Gates created a corporate entity to do business: on 4 April 1975 they named and founded “Microsoft.” The company’s first contract was a licensing agreement to allow Altair to distribute their version of BASIC under the name “Altair BASIC.”

Microsoft BASIC

Microsoft’s emergence coincided with the start of a boom in affordable personal computers; every new hardware wanted to ship software to be more appealing to professional and hobbyist developers. A BASIC interpreter made all such systems easier to sell, and Microsoft developed and licensed many more BASIC interpreters to other manufacturers, including to Apple for the Apple II, to IBM, the Z-80, and the Commodore 64.

Smartly, these versions of BASIC were called “Microsoft BASIC” and the company extended the functionality of BASIC, adding improved string manipulation and better graphics support. Plus, the “Microsoft” brand name was displayed whenever the interpreter started up, which raised the company’s profile with users.

The first version of Microsoft Basic for the Apple II was on a cassette. Source: Global Nerdy 2. More and better developer tools

Microsoft’s commercial breakthrough began with creating and distributing the DOS operating system in 1981, and then the Windows operating system in 1985. In 1990, Microsoft launched Windows 3.0 and also introduced Microsoft Word and Microsoft Excel. This combination of an operating system and word processor helped Windows gain more popularity, and made the OS even more popular. Here’s how sales of the different versions compared:

Read more


Wrench in the Gears

Andreessen and Horowitz’s Debrief On Their Fairshake PAC and Sunny Days Ahead For “Little Tech” Under Trump

I took notes on Marc Andreessen and Ben Horowitz’s post-election discussion of their Fairshake pro-crypto Pac and the coming Trump presidency about two months ago, but set them aside and other topics took precedence. Given the rising craziness in the crypto space around the inauguration, I thought it was a good time to put them [...]

I took notes on Marc Andreessen and Ben Horowitz’s post-election discussion of their Fairshake pro-crypto Pac and the coming Trump presidency about two months ago, but set them aside and other topics took precedence. Given the rising craziness in the crypto space around the inauguration, I thought it was a good time to put them out for consideration. A quick glance at the finances of their pro-crypto / pro-blockchain Pac should be a wake up call to anyone doubting the rising tide of automated, smart contract law and global cyber governance. We need to wrap our heads around the fact that it’s less about money and power and more about information theory, token engineering, and the shift of social systems into a networked super intelligence operating under the United Nations Sustainable Development Goals for expanded “human potential.” It is a bipartisan effort. It is an international effort. It will be framed as a “populist uprising” to take back “the commons,” engineered of course by the world’s largest asset holders. In my opinion, meme-coins are biosemiotic aides facilitating emergent swarm intelligence. Tread carefully around those digital mind viruses folks. A lot of money, and tokens, are being thrown around trying to get their planned cyberphysical-sociotechnical future to stick. 

 

Source: https://web.archive.org/web/20250118220652/https://www.followthecrypto.org/committees/C00835959 Source: https://embed.kumu.io/57d6a066cd053fc3241a8ee0c984a34e#untitled-map?s=bm9kZS1JVzhhQVBxVg%3D%3D

Ripple is a major donors to the Fairshake Pac. See relation to digital ID and MIT Media Lab / social physics and automated legal systems.

My video recorded today on Trump’s second inauguration:

The Why Files “irradiated wolves” video: 

The A16Z discussion comparing the Biden / Trump positions on crypto and emerging tech: 

An older presentation on Laura Arrillaga Andreessen (Marc’s wife) and social impact finance at Stanford:

Two older presentations on next-gen nuclear being promoted vigorously by A16z:

Monday, 20. January 2025

Damien Bod

ASP.NET Core user application access token management

This article looks at management application access tokens in an ASP.NET Core web application. Any application with or without a user can use application access tokens as long as the application can persist the tokens in a safe way. Code: https://github.com/damienbod/token-mgmt-ui-application Blogs in this series Setup The ASP.NET Core web application authenticates using OpenID Connect […]

This article looks at management application access tokens in an ASP.NET Core web application. Any application with or without a user can use application access tokens as long as the application can persist the tokens in a safe way.

Code: https://github.com/damienbod/token-mgmt-ui-application

Blogs in this series ASP.NET Core user delegated access token management ASP.NET Core user application access token management ASP.NET Core delegated OAuth Token Exchange access token management Setup

The ASP.NET Core web application authenticates using OpenID Connect and OpenIddict as the secure token server. The application needs to use data from an app-to-app resource. An OAuth client credential flow is used to get an application access token to access the API. The OAuth client credentials flow can only be used when it can keep a secret. This token has nothing in common with the delegated access token from the user authentication. The application is persisted once for the application. An in-memory cache is used for this. The application sends the application access token as a bearer token to the API.

What must an application manage?

An access token management solution must ensure that tokens are securely stored per application for application tokens and updated after each UI authentication or refresh. The solution should be robust to handle token expiration, function seamlessly after restarts, and support multi-instance deployments. The tokens must be persisted safely in multiple instance setups. Additionally, it must effectively manage scenarios involving invalid or missing access tokens.

Properties of token management in the solution setup: The access token is persisted per application The token expires The token needs to be persisted somewhere safely (Safe and encrypted storage if not in-memory) The solution must work after restarts The solution must work for multiple instances when deployed to multi-instance deployments. The solution must handle invalid access tokens or missing access tokens Implementation example

An ApplicationAccessTokenCache service is used to manage the access tokens for the application. The service is registered as a singleton and runs once for the whole application. Each request scope can use this. The application looks in the cache for a valid token and if no valid token is present, the service requests a new access token using the OAuth client credentials flow. The token is persisted to the cache using the client ID. This means only one token can exist per client definition.

using IdentityModel.Client; using Microsoft.Extensions.Caching.Distributed; using System.Text.Json; namespace Ui; /// <summary> /// Cache persists token per application /// </summary> public class ApplicationAccessTokenCache { private readonly ILogger<ApplicationAccessTokenCache> _logger; private readonly HttpClient _httpClient; private readonly IConfiguration _configuration; private static readonly object _lock = new(); private readonly IDistributedCache _cache; private const int cacheExpirationInDays = 1; private class AccessTokenItem { public string AccessToken { get; set; } = string.Empty; public DateTime ExpiresIn { get; set; } } public ApplicationAccessTokenCache( IConfiguration configuration, IHttpClientFactory httpClientFactory, ILoggerFactory loggerFactory, IDistributedCache cache) { _configuration = configuration; _httpClient = httpClientFactory.CreateClient(); _logger = loggerFactory.CreateLogger<ApplicationAccessTokenCache>(); _cache = cache; } public async Task<string> GetApiToken(string clientId, string scope, string secret) { var accessToken = GetFromCache(clientId); if ((accessToken != null) && (accessToken.ExpiresIn > DateTime.UtcNow)) { return accessToken.AccessToken; } _logger.LogDebug("GetApiToken new from secure token server for {clientId}", clientId); var newAccessToken = await GetInternalApiToken(clientId, scope, secret); AddToCache(clientId, newAccessToken); return newAccessToken.AccessToken; } private async Task<AccessTokenItem> GetInternalApiToken(string clientId, string scope, string secret) { try { var disco = await HttpClientDiscoveryExtensions.GetDiscoveryDocumentAsync( _httpClient, _configuration["OpenIDConnectSettings:Authority"]); if (disco.IsError) { _logger.LogError("disco error Status code: {discoIsError}, Error: {discoError}", disco.IsError, disco.Error); throw new ApplicationException($"Status code: {disco.IsError}, Error: {disco.Error}"); } var tokenResponse = await HttpClientTokenRequestExtensions.RequestClientCredentialsTokenAsync(_httpClient, new ClientCredentialsTokenRequest { Scope = scope, ClientSecret = secret, Address = disco.TokenEndpoint, ClientId = clientId }); if (tokenResponse.IsError) { _logger.LogError("tokenResponse.IsError Status code: {tokenResponseIsError}, Error: {tokenResponseError}", tokenResponse.IsError, tokenResponse.Error); throw new ApplicationException($"Status code: {tokenResponse.IsError}, Error: {tokenResponse.Error}"); } return new AccessTokenItem { ExpiresIn = DateTime.UtcNow.AddSeconds(tokenResponse.ExpiresIn), AccessToken = tokenResponse.AccessToken! }; } catch (Exception e) { _logger.LogError("Exception {e}", e); throw new ApplicationException($"Exception {e}"); } } private void AddToCache(string key, AccessTokenItem accessTokenItem) { var options = new DistributedCacheEntryOptions() .SetSlidingExpiration(TimeSpan.FromDays(cacheExpirationInDays)); lock (_lock) { _cache.SetString(key, JsonSerializer.Serialize(accessTokenItem), options); } } private AccessTokenItem? GetFromCache(string key) { var item = _cache.GetString(key); if (item != null) { return JsonSerializer.Deserialize<AccessTokenItem>(item); } return null; } }

The ApplicationUsersService class uses the access token from the token service. This is a scoped service and the data is requested from the API using a bearer token in the authorization header.

using IdentityModel.Client; namespace Ui; public class ApplicationUsersService { private readonly IConfiguration _configuration; private readonly IHttpClientFactory _clientFactory; private readonly ApplicationAccessTokenCache _apiTokenCacheClient; public ApplicationUsersService(IConfiguration configuration, IHttpClientFactory clientFactory, ApplicationAccessTokenCache apiTokenCacheClient) { _configuration = configuration; _clientFactory = clientFactory; _apiTokenCacheClient = apiTokenCacheClient; } /// <summary> /// HttpContext is used to get the access token and it is passed as a parameter /// </summary> public async Task<string> GetPhotoAsync() { try { var client = _clientFactory.CreateClient(); client.BaseAddress = new Uri(_configuration["AuthConfigurations:ProtectedApiUrl"]!); var access_token = await _apiTokenCacheClient.GetApiToken( "CC", "myccscope", "cc_secret" ); client.SetBearerToken(access_token); var response = await client.GetAsync("api/ApplicationUsers/photo"); if (response.IsSuccessStatusCode) { var data = await response.Content.ReadAsStringAsync(); if (data != null) return data; return string.Empty; } throw new ApplicationException($"Status code: {response.StatusCode}, Error: {response.ReasonPhrase}"); } catch (Exception e) { throw new ApplicationException($"Exception {e}"); } } }

The required services are added the the application in the program file.

builder.Services.AddSingleton<ApplicationAccessTokenCache>(); builder.Services.AddScoped<ApplicationUsersService>(); builder.Services.AddHttpClient(); builder.Services.AddDistributedMemoryCache();

The token cache works great when using in-memory cache. If using a persistent cache, care needs to be taken that the access tokens are persisted in a safe way.

Notes

In follow up blogs, I will look at the different ways and the different types of strategies which are used to implement token management in ASP.NET Core web applications.

Microsoft.Identity.Web delegated access tokens & OBO access tokens Microsoft.Identity.Client application tokens Azure SDK tokens Handling multiple access tokens OAuth Token Exchange for downstream user delegated access tokens Links

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/additional-claims

https://github.com/dotnet/aspnetcore/issues/8175

Sunday, 19. January 2025

Doc Searls Weblog

The Blame Game

Twenty-third in the News Commons series Seventh on the #LAfires Disaster coverage tends to go through four stages: Live reporting. TV stations stop all advertising and go into round-the-clock coverage. Radio stations drop the feeds from elsewhere and go wall-to-wall with live reports. Newspapers drop their paywalls. Coverage by the best of them ranges from […]

Twenty-third in the News Commons series
Seventh on the #LAfires

Images from a Google image search for “LA fires aftermath.” Sources listed below.†

Disaster coverage tends to go through four stages:

Live reporting. TV stations stop all advertising and go into round-the-clock coverage. Radio stations drop the feeds from elsewhere and go wall-to-wall with live reports. Newspapers drop their paywalls. Coverage by the best of them ranges from good to heroic. As stories go, they are all about the problem. Human interest. The worst is over, so the stories go to human loss, resourcefulness, forbearing, kindness, and mendacity. Reporters on TV stand in front of some hellscape and talk to victims, heroes, or anyone they can find. This leverages the need for characters and their problems, with stories about how they survived, who or what they lost, always at least with hints toward movement forward. Blame. This is all about character. Reporters are taught to seek the five W’s: Who, What, Where, When, and Why, sometimes appending an H for How. But since stories always require characters, Who is what matters most. Coming to an understanding. While that’s the goal, and something nearly everyone wants, it’s provisional while the story continues. Also, full understanding, if it ever comes, will be at the end. And stories like the LA fires may never end, because there are contexts for them that may never change.

But that’s where we are now. In Stage 4. Here’s a Google search I just did:

Note that all of these stories are one to three days old. All of them are provisionally conclusive (meaning they still keep the story going). And all of them are less interesting than Stage 3: Blame.

I want to focus on that because blame makes story-telling—and story-generating—easy. Too easy.

That’s why Donald Trump—the best story-generator (and blame-placer) the world has ever known (and I mean this seriously)—wasted no time fingering Gavin Newsom:

Politifact spent 942 words explaining, among other things, that there was plenty of water, that a “water restoration declaration” never existed, that the smelt thing concerned water for elsewhere, and that what Trump said was wrong in other ways. But, as Ronald Reagan said, If you’re explaining, you’re losing. And Trump never loses, because that’s out of character. (Again, I mean this seriously. We’re talking stories here. The man is all-character, all the time.) And it is impossible for the media, which now includes everybody, not to participate in his story processes.

Of course, stories being what they are, Trump has hardly been alone in playing the blame game. Scott Galloway:

LAFD Chief Kristin Crowley took time out from fighting the fires to blame Mayor Karen Bass for cutting $17.6 million from the department’s budget. The department’s $895 million budget actually increased by $58 million as a result of the latest union contract. To get that higher pay to firefighters, the department reduced spending on equipment and training. The mayor’s response added to the drama, fueling rumors that the chief had been fired. Right-wing podcasters blame Fire Chief Crowley’s gayness, saying she was a DEI hire. Note: She has outstanding qualifications.

For all the good work being done at Stage 4, the urge to blame will never cease.

And we need some. Justice demands it.

What kind of justice? Well, there are many: retributive, distributive, restorative, procedural, social, environmental, economic, and so on. Of all those, retributive justice is what people want most and best understand. Perpetrators must be found, punished, and made to pay.

But starting with blame is too easy, too simple, often wrong, and always incomplete. Other factors matter. Conditions. Contexts. Black swans.

That’s why coming to an understanding is far more important, especially if we want to minimize or avoid the same kinds of disasters in the future. That’s what I’ll visit in my next series of posts.

Meanwhile, some of my open tabs:

LA Times: How to help those affected by fires raging across Los Angeles County. KNBC/4: Asher Bingham, an LA artist, is drawing pictures of houses lost in the fire. “What I’m fascinated with is taking something from a picture and building a story to it,” she tells “So Asher picked up a pen and shared the artwork to Instagram with a simple offer to anyone that has lost a home in the LA fires. ‘I will draw your home for free… Three million views on that video later, there is now a waiting list of hundreds of requests.” Wired: Los Angeles Needs to Fireproof Communities, Not Just Houses. Business Insider via MSN: I’m a pilot flying a DC-10 fire bomber to battle the LA fires. This is what I’ve seen — and this is what needs to stop. Kwaai Events: Fire Resilience & Beyond with Personal AI Hackathon 2025 – $30K in Prizes. Washington Post: A key ‘weakness’ in L.A.’s wildfire strategy went unaddressed for years, Post probe shows.

† Sources via Google Image search: Reuters, NBC News, Marketwatch, ABC News, Hindustan Times, ABC, NPR, USA Today, The Indian Express, Nevada Appeal, YouTube, Commercial Observer, East Bay times, CBC, India TV News, Urban Land Magazine, Hope Standard, TMZ, Yahoo, Bloomberg, Instagram, and iObserve.

Saturday, 18. January 2025

Wrench in the Gears

Trump Dance, Oscillation, And Going “Inside”

In this morning’s video I somehow missed the fact that the inauguration coincides with MLK Day, which is an interesting sync with the “melanin as optical material” lens. I’m going to drop a few links to old blog posts that touch on the YMCA and “out of school time learning” as as well as my [...]

In this morning’s video I somehow missed the fact that the inauguration coincides with MLK Day, which is an interesting sync with the “melanin as optical material” lens. I’m going to drop a few links to old blog posts that touch on the YMCA and “out of school time learning” as as well as my “Momo” read-aloud playlist. Maybe I should do a read aloud of Bentov’s “Stalking the Wild Pendulum,” too? I’m understanding it much better now. Look for a discussion of quantum realism with Joseph Gonzales in the coming week. I’ll just say it once again, I can’t believe I have to talk about any of this, but if you don’t take it too seriously, conjecturing can be rather fun.

https://x.com/MAHAAction/status/1879945173721051166

Going “inside”

Momo Read Aloud Playlist https://wrenchinthegears.com/2017/05/08/out-of-school-time-learning-a-wolf-in-sheeps-clothing/ https://wrenchinthegears.com/2018/03/18/too-big-to-map-but-i-tried/ https://wrenchinthegears.com/2019/11/15/the-family-friendly-schools-act-a-set-up-for-soft-policing-schools-to-profit-impact-investors/ https://wrenchinthegears.com/2023/02/27/gods-eye-view-part-5-prediction-markets-in-public-policy/ https://wrenchinthegears.com/2023/02/05/dallas-esports-and-bucky-ballers-guest-post-and-follow-up-discussion/ https://ymcadallas.org/programs/youth-sports/esports

 

 

 

 

 

 

 

 

Friday, 17. January 2025

Wrench in the Gears

Gestalt, Quakers and Carbon Trading – Do You See Faces Or A Vase?

In this video I draw connections between Gestalt theory and organizational development as applied to digital groupthink in the context of Christiana Figueres, a leader in the development of carbon trading, who trained at the Gestalt Institute of Cleveland. As a young woman, she attended Swarthmore College, a Quaker institution. The first wife of her [...]

In this video I draw connections between Gestalt theory and organizational development as applied to digital groupthink in the context of Christiana Figueres, a leader in the development of carbon trading, who trained at the Gestalt Institute of Cleveland. As a young woman, she attended Swarthmore College, a Quaker institution. The first wife of her father, three-time president of Costa Rica and MIT alumnus, had ties to Quaker expats (Henrietta Boggs’ uncle and aunt) who emigrated south from Alabama in the 1950s.

Kenneth Boulding, a Quaker economist who developed some of the first ideas around social impact investing, and his wife Elise, sociologist who built the field of peace studies, were affiliated with Swarthmore though Kenneth only did a year’s stint as a guest lecturer.

When our family toured the campus for a college visit, it was made clear that only the top-tier candidates would be accepted, because many slots were reserved for equity outreach. Interestingly a high percentage of students presenting that day asserted their intentions to become economists with aspirations of working at the World Bank and the IMF. That was an eye-opener for sure! 

https://prabook.com/web/christiana.figueres/451403 https://www.swarthmore.edu/news-events/un-climate-chief-christiana-figueres-79-among-most-influential-people-2016 https://acrcarbon.org/news/winrock-international-applauds-board-member-christiana-figueres-on-united-nations-climate-change-secretariat-appointment/ https://www.ecosystemmarketplace.com/articles/christiana-figueres-close-personal-carbon-markets/ https://embed.kumu.io/a257abdf4aa4cbf3f75b90154c4f5099#untitled-map?s=bm9kZS1ycmxMMHJvNw%3D%3D https://www.neh.gov/humanities/2014/januaryfebruary/statement/first-lady-the-revolution https://www.quakersintheworld.org/quakers-in-action/257/Quakers-in-Costa-Rica https://alum.mit.edu/slice/mits-costa-rican-president

I use the visual of the optical illusion of paired silhouettes with a vase in the center to describe how two narratives can be presented, but often only one is truly “seen.” This Gestalt concept is applied to parallel narratives – one presented in two recent stories on Unlimited Hangout that foreground militarism and data surveillance in AI healthcare and the story I keep attempting to tell about gamified managed community “wellness” protocols linked to social impact finance deals on blockchain that on another level will be leveraged to catalyze emergent behaviors and possibly advance bio-hybrid information processing.

I also describe a strange encounter in which Aetna health care intended to target low-income communities of color for VR guided meditation in a digital “jungle” setting. The second hour of the video is a repeat of two site visits Jason and made in Denver in 2022 to the then new Palantir headquarters and the state capitol.

 

Thursday, 16. January 2025

The Pragmatic Engineer

The Pulse #120: What does Salesforce’s software engineering hiring freeze mean?

Also: how an hour-long GitHub outage is a reminder of the real cost of reliability, what Cloudflare’s recruiting statistics say about the job market, and more.

The Pulse is a series covering insights, patterns, and trends within Big Tech and startups. Notice an interesting event or trend? Send me a message.

Today, we cover:

Industry pulse. TikTok’s US sell-or-shut-down deadline nears, CEO fired over disastrous Sonos software update, unusual use of AI in elite tennis, NVIDIA’s “personal” AI computer, Meta cuts DEI programs, and more.

What does Salesforce’s software engineering hiring freeze mean? Amusing: between the two highest-paid corporate functions (sales and engineering) the one getting a hefty headcount increase is sales, which cannot show its productivity improved by GenAI tools.

GitHub outage: the real cost of reliability. Turns out, an hour-long outage per quarter is well within 99.9% reliability. GitHub offers this SLA for its customers as default, while GitLab Dedicated promises 99.5% (which allows for up to 10 hours/quarter in downtime.) It will cost you if you need more reliability.

What Cloudflare’s recruiting statistics say about the job market. There were about 6x more applicants for every open position at Clouflare in 2024, than in 2021. 2021-2024, Cloudflare has consistently hired about the same number of people.

How the commercial sector and academia regained computing lead. From the 1940s to the 1990s, software engineering breakthroughs were frequently coming from work done within governmental organizations. Since then, this has changed, with Big Tech, startups and academia taking a lead in pushing innovation ahead – at least for now.

1. Industry pulse TikTok’s US sell-or-shut-down deadline nears

TikTok is one of the biggest social media platforms, with around 1.5 billion users globally and circa 121 million in the US, many of them younger in age. It’s owned and operated by Bytedance, which is based in China, and there are security concerns relating to this: India banned TikTok in 2020, while the US, Canada, EU and UK ban the app from government devices.

The US has taken a step in India’s direction: in April 2024, it passed a bill that requires TikTok be sold to a US company in order to bring it within US jurisdiction, or be banned from the US. The deadline for this is close: Sunday, 19 January. At the time of publication no sale had been announced, but despite the absence of a buyer so far, TikTok is an extremely attractive acquisition, with one in three US citizens using it. So far, speculation about potential buyers has focused on:

Elon Musk: the owner of X, a much smaller social network than TikTok. As one of the world’s richest people, and with his growing political influence in the US as part of the incoming Trump administration, Musk could be a serious bidder.

Other individuals could pull syndicates together to buy TikTok:

The most-subscribed YouTuber, Mr Beast

Former US Treasury secretary, Steven Mnuchin

A Shark Tank investor, Kevin O'Leary

Activision’s former CEO, Bobby Kotick

It’s curious that no large tech companies like Meta, Snap, Microsoft, and Google, have been mooted as potential buyers, and could be due to concerns about antitrust regulation.

A likely outcome is that TikTok sells to the highest bidder, whoever that is; although the video-sharing app might have a trick up its sleeve: spook US lawmakers into backing out of a ban.

The Information reports Tiktok plans to shut down the app on Sunday, in a move almost guaranteed to trigger a sizable reaction by its 100M+ US users. On the principle that politicians respond to pressure, the strategy seems to be to generate a noisy response by US voters that causes politicians to change course away from a ban, out of fear of being punished at the ballot box in future elections by disgruntled TikTok users who blame elected officials for the popular app being unavailable.

To be fair, TikTok has little to lose and a lot to gain: in the worst case, it sells to the highest bidder, and in the best case, it gets more time to operate in the US, and perhaps to increase the value of offers on the table for it.

CEO fired over disastrous Sonos software update

Read more

Wednesday, 15. January 2025

The Pragmatic Engineer

“The Coding Machine” at Meta with Michael Novati

In today’s episode, I’m joined by Michael Novati, Co-founder and CTO of Formation. Michael spent eight years at Meta, where he was recognized as the top code committer company-wide for several years.

Before we start: as an experiment, below the takeaways, I’m including a more detailed, bullet-point summary in this issue. This is an experiment: please let me know how you like it!

Stream the Latest Episode

Available now on YouTube, Apple and Spotify. See the episode transcript at the top of this page.

Brought to You By

Vanta — Automate compliance and simplify security with Vanta.

WorkOS — The modern identity platform for B2B SaaS.

In This Episode

In today’s episode of The Pragmatic Engineer, I’m joined by Michael Novati, Co-founder and CTO of Formation. Before launching Formation, Michael spent eight years at Meta, where he was recognized as the top code committer company-wide for several years. The “Coding Machine” archetype was modeled after Michael at the company.

In our conversation, we talk about what it was like working at Meta and dive into its engineering culture. Michael shares his journey of quickly climbing the ranks from intern to principal-level and gives level-headed advice on leveling up your career. Plus, we discuss his work at Formation, where he helps engineers grow and land roles at top tech companies.

In this episode, we cover:

An overview of software architect archetypes at Meta, including “the coding machine”

Meta’s org structure, levels of engineers, and career trajectories

The importance of maintaining a ‘brag list’ to showcase your achievements and impact

Meta’s engineering culture and focus on building internal tools

How beating Mark Zuckerberg in a game of Risk led to him accepting Michael’s friend request

An inside look at Meta’s hiring process

Tips for software engineers on the job market on how to do better in technical interviews

And more!

Takeaways

Here are my biggest takeaways from this episode:

1. The importance of archetypes at Meta. Archetypes are initially modelled after existing engineers at Meta, and they serve two main roles:

Fairness: offer a way for the company to “patter match” upcoming engineers against these personas, and have a fair system to determine who is at this higher level, and who is not

Career path: offer a non-manager career path that goes beyond the Staff engineer (E6) level. Before archetypes were a thing, it was unclear how to get promoted to E7 and E8 and above levels – where E8 is the equivalent of Director-level (D1) roles

Archetypes are ingrained in Meta’s engineering culture and are a major differentiator compared to other Big Tech companies that lack such nuanced differentiators at the Staff+ engineering levels.

2. There’s a limit on how much influence an IC can have, even at Meta. Despite offering IC career paths that are better-defined at the Staff+ levels than most other large tech companies: at the Principal and above engineering level, there are still more directors than engineers. Michael used to think this is unfair – but, over time, he realized why this is. As he put it:

“Even if you write 10x the code or 100x the code, you cannot replace 3,000 engineers with one engineer. So you can be a VP of engineering, though, overseeing 3,000 engineers. No matter how you multiply it out: even if you are just are the manager of 10 ‘superstar’ engineers, you still have more influence/impact over the direction of those people in the company.”

It’s helpful to understand the realistic and necessary limitations of the individual contributor path in terms of influence, within a large organization.

3. Tenure can become surprisingly important at a fast-growing scaleup. Michael recalled how when he became an E7 (the equivalent of a Principal Engineer at other, similar companies) – he became a part of a tightly knit group of E7+ engineers. Here, the cultural divide between those that had been at Meta for a long time – and promoted into this position – and those hired externally was strong.

Many of the external hires struggled to make the kind of impact that tenured E7+ engineers could, and lots of external hires ended up leaving the company relatively quickly.

Michael observed this during the earlier phase of Facebook/Meta, when it was growing very quickly. While the culture might have changed: this highlights how challenging it can be to “pick up” the culture of a fast-growing scaleup from outside, and how being with the company for a longer time can help you get more stuff done efficiently – and thus also grow faster in your career.

4. Causing an outage at a fast-moving scaleup is not the end of the world. Michael shared an amusing outage when he accidentally overloaded a node (a virtual machine) thanks to shipping a prototype version of a photo mask on Facebook profiles, to add support for a cause. The feature blew up a few days after setting it live, because it could not handle a node being written millions of times per hour, to update two-way graph nodes between a user’s profile and this image template. On top of this, this failure caused cascading failures.

Rolling back this change was not an option. In this case, the database infrastructure team stepped in; made the edge one-way (rather than two-way) and thus removed the write bottleneck.

Michael learned an important lesson: and in the end, it was still a net win for Facebook to realize that this feature is wildly popular a day or two after the launch. Spending a lot of time building a feature that might never get used would have been a worse investment – during this early growth stage at Facebook, that is!

5. Interview processes have not changed much over the last decade! Michael coaches engineers to prepare for interviews, so he has first-hand experience in this. With his words:

“The interview styles haven't changed since before Leetcode, and since after Leetcode. It’s the style that has been around. Facebook didn't invent these interviews: it borrowed a bit from Yahoo, Microsoft and Google. Google also borrowed from other companies at the time.

These days, we see a lot of AI companies, have daily “Facebook-like” processes and vibes: such as OpenAI.

The interviews are the ‘Leetcode interviews’ where they test language-agonostic problem-solving skills.

It’s always been the point to test for these kinds of problems: because it’s what engineers do! Solve problems, regardless of what specific tech stack or programming language you use.”

A consequence of the interview process not changing much, but the job market becoming more competitive is how the bar to do well on these interviews went up. This is because there are more and better preparation materials, so the “average” candidate does better on these interviews than years before. Preparing for interviews at Big Tech companies and scaleups is no longer a “nice to have:” it’s a necessity for even strong engineers, who want to get a job offer.

A summary of the conversation

For those of you more interested in reading a summary of the conversation, see it here. This is an experiment — please leave a comment on how you find this addition!

From intern to E7 in 6 years

Michael joined Meta (then Facebook) as an intern and, remarkably, reached the E7 level (equivalent to principal engineer) in just six years. This rapid career progression is unusual, as a path like this would typically take at least a decade.

His relationship with his managers was critical, built on mutual trust and transparency. His managers knew he was passionate and sometimes impulsive but trusted his judgement. Michael also felt that he could help his managers in their jobs. He was receptive to direct feedback, allowing him to address issues quickly.

He maintained a "notepad" of his accomplishments, noting down significant fixes, bugs, or other contributions. This helped him summarise his work and make sure he was hitting the requirements of the next level, and he would review these with his manager.

From his first days as an intern, Michael demonstrated his coding skills. On his second or third day, he noticed the company's org chart tool was clunky and inefficient. Without asking for permission, he rewrote the tool, creating a horizontal layout and shipping it. This was very well received by colleagues.

As a product engineer, Michael worked on various teams, including internal tools, Facebook Groups, News Feed, Facebook Workplace and Messenger for Kids. He spent about 30% of his time working on his assigned product teams as a senior engineer would. The remaining 70% of his time was spent on large-scale refactoring, code cleanups, and company-wide projects.

Michael became known as the "coding machine" at Meta. The company developed this archetype, in part, to describe Michael's unique impact.

The "coding machine" archetype is for engineers who can move projects forward, unblock other people, refactor code quickly, and help launch products that may typically require a team of engineers.

The archetype was created after comparing him to other engineers at the E7 level, focusing on the overall impact he was making, which was similar to other E7s but not within the existing archetypes, such as "fixer".

While anyone can write a lot of code, what makes a "coding machine" is the impact the code has. This impact is measured by how much it moves projects forward, helps launch products, unblocks people, and speeds up refactoring.

The "coding machine" archetype was championed by an executive, Tom Allison, who helped connect the dots to make the archetype a reality.

Michael explains that at Meta, engineers are compared to professional sports teams. While everyone at a high level is good at basic tasks, people have specialities. Michael's was moving prototypes forward and refactoring code really fast.

Meta’s engineering culture

Meta has an engineering-first culture, where individual contributors are highly valued and empowered. The company wanted to create career paths for talented individual contributors, so that they did not have to become managers to progress.

Internal tools at Meta are treated as products. They were built with the same code base as user-facing tools. This made the internal tools team one of the most exciting to work on because engineers could build product at a much faster pace.

Meta built most of their infrastructure from scratch which resulted in custom tools. Because internal tools were seen as products, it gave the company an engineering product ecosystem.

Michael's intern project was an internal meeting scheduling tool, designed to quickly find meeting times and rooms for groups of people.

Michael recalls that Meta had custom version control, code review and build tools. While the company used SVN as a backbone, they used Mercurial locally on people's machines to manage their local branches. The company chose Mercurial because it was easier to work with the open-source team to hack into it, which aligned with Meta’s culture.

Many internal tools that Meta created have seeded other companies. Examples include Statsig (experimentation platform) Honeycomb (observability.)

The values of moving fast, breaking things and being bold were all reinforced at Meta. If you moved really fast and broke something, you would not get fired. If you were making a bold bet and pushing limits that was also rewarded, even if it didn't work out.

Michael shared a story about how he became Facebook friends with Mark Zuckerberg. During a game of Risk, he formed an alliance with Mark, only to betray him later to win the game. Despite this – or perhaps because of it! –, Mark accepted his friend request that had been pending for some time by then.

At Meta, product reviews are a regular part of the development cycle, also known as "Zuck Reviews". These 15-minute presentations allowed Mark Zuckerberg to give direction and feedback on products. He asks a lot of detail-focused questions to figure out the exact details and make sure that the best possible product was being built.

Michael caused quite the outage, one time. A prototype feature he built allowed users to overlay a photo template on their profile picture. When a large number of users used the French flag template, the system crashed because Michael designed the database to have two way edges for the prototype. One of the nodes got overloaded causing cascading effects. While a two-way edge was not recommended to use, Michael explains he made this decision to simplify things for a prototype.

The interview process at Meta, during Michael’s time

The interview process at Meta typically starts with a recruiter screen, followed by a technical screen (a 45-minute coding interview, usually with two questions). If that goes well, candidates then attend an on-site interview, which includes two more coding interviews, a behavioral interview, and a systems design interview.

During Michael’s time, these interviews had the names “Jedi”, “Pirate” and “Ninja”.

Meta’s technical interviews are distinct because they are whiteboarding style with almost no small talk. Interviewers jump into the technical questions and expect candidates to walk through a clear problem-solving process, without compiling the code to check if it works.

After the onsite interview, there is a debrief where interviewers share feedback. If there are no red flags, then the candidate goes to the hiring committee.

The hiring committee consisted of a quorum of at least three director or VP-level engineering leaders. A recruiter presents a packet about the candidate. The default at this stage is that a candidate is likely to be hired, so focus is typically on red flags.

The packet contains detailed information, including feedback from the interviewers, the interviewer's history, questions asked, and how many times the questions have been asked. This helps the directors calibrate and interpret the feedback.

The hiring committee looks for flags and inconsistencies but the most common decision point was determining the candidate's level. Michael made it to the meetings because he wanted to ensure that Facebook did not lower its hiring bar as it scaled.

Michael notes that his time in the hiring committee has been helpful in his current business, coaching people, and that he can offer a different point of view to engineers trying to undestand how it all works.

Advice for software engineers to grow professionally

Michael advises that finding the right job for the right alignment is more important than just checking the boxes and passing an interview.

He notes that the interview processes at many top tech companies are similar, originating from Yahoo, Microsoft and Google and the style has been consistent. This style focuses on testing language and stack-agnostic problem-solving skills.

Michael compares interview preparation to going to a personal trainer. He advises that engineers must get back in shape to prepare for interview processes, regardless of how much experience they have.

The job market for software engineers has changed and is more competitive. There are now more steps in the process. Companies are using online assessments and implementing team matching.

Michael's most productive year, he made thousands of code commits (diffs). While at Meta, most of his code was in Hack, a version of PHP. He now primarily codes in Javascript. His favourite language now is Typescript.

Michael advises that storytelling is a key way to communicate, influence and share as humans. He recommends the book The Histories by Herodotus.

The Pragmatic Engineer deepdives relevant for this episode

Inside Meta’s engineering culture

Stacked diffs (and why you should know about them)

Engineering career paths at Big Tech and scaleups

Inside the story of how Meta built the Threads app

Timestamps

(00:00) Intro

(01:45) An explanation of archetypes at Meta, including “the coding machine”

(09:14) The organizational structure and levels of software engineers at Meta

(10:05) Michael’s first project re-writing the org chart as an intern at Meta

(12:42) A brief overview of Michael’s work at Meta

(15:29) Meta’s engineering first culture and how Michael pushed for even more for ICs

(20:03) How tenure at Meta correlated with impact

(23:47) How Michael rose through the ranks at Meta so quickly

(29:30) The engineering culture at Meta, including how they value internal tools

(34:00) Companies that began at Meta or founded by former employees

(36:11) Facebook’s internal tool for scheduling meetings

(37:45) The product problems that came with scaling Facebook

(39:25) How Michael became Facebook friends with Mark Zuckerberg

(42:05) The “Zuck review” process

(44:30) How the French attacks crashed Michael’s photo inlay prototype

(51:15) How the photo inlay bug was fixed

(52:58) Meta’s hiring process

(1:03:40) Insights from Michael’s work at Formation

(1:09:08) Michael’s advice for experienced engineers currently searching for a job

(1:11:15) Rapid fire round

Resources & Mentions

Where to find Michael Novati:

• X: https://x.com/michaelnovati

• LinkedIn: https://www.linkedin.com/in/michaelnovati/

• Facebook: https://www.facebook.com/mn/

Mentions during the episode:

• Software Architect Archetypes: https://newsletter.pragmaticengineer.com/p/software-architect-archetypes

• Formation: https://formation.dev/

• Get your work recognized: write a brag document: https://jvns.ca/blog/brag-documents/

• A Work Log Template for Software Engineers: https://blog.pragmaticengineer.com/work-log-template-for-software-engineers/

• GitHub: https://github.com/

• Mercurial: https://www.mercurial-scm.org/

• Statsig: https://statsig.com/

• Sentry: https://sentry.io/welcome/

• Graphite: https://graphite.dev/

• Mark Zuckerberg at Startup School 2013:

• Mark Zuckerberg at Startup School 2012:

• Risk board game: https://en.wikipedia.org/wiki/Risk_(game)

• Wecode: https://wecode.io/en/

• CodeSignal: https://codesignal.com/

• HackerRank: https://www.hackerrank.com/

• Hack: https://engineering.fb.com/2014/03/20/developer-tools/hack-a-new-programming-language-for-hhvm/

• Javascript: https://www.javascript.com/

• Typescript: https://www.typescriptlang.org/

• The Histories: https://www.amazon.com/Histories-Herodotus/dp/0140449086

Production and marketing by https://penname.co/. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.


Damien Bod

ASP.NET Core user delegated access token management

The article looks at managing user delegated access tokens for a downstream API in an ASP.NET Core web application. There are many ways of implementing this, all with advantages and disadvantages. The tokens are requested from an OpenID Connect server using the recommended standards. In this blog, the UI access token from the application authentication […]

The article looks at managing user delegated access tokens for a downstream API in an ASP.NET Core web application. There are many ways of implementing this, all with advantages and disadvantages. The tokens are requested from an OpenID Connect server using the recommended standards. In this blog, the UI access token from the application authentication is re-used for the downstream API.

Code: https://github.com/damienbod/token-mgmt-ui-delegated-direct

Blogs in this series ASP.NET Core user delegated access token management ASP.NET Core user application access token management ASP.NET Core delegated OAuth Token Exchange access token management Setup

The solution uses a secure downstream API and requires user delegated access tokens for access. The UI application is implemented using ASP.NET Core and razor pages. The UI application authenticates against an OpenID Connect server implemented using OpenIddict. The application client is implemented using an OpenID Connect confidential client and the OpenID Connect code flow with PKCE. This flow returns an access token which is used for the downstream API.

What must an application manage?

An access token management solution must ensure that tokens are securely stored per user session for user delegated tokens and updated after each UI authentication or refresh. The solution should be robust to handle token expiration, function seamlessly after restarts, and support multi-instance deployments. Additionally, it must effectively manage scenarios involving invalid or missing access tokens.

Properties of token management in the solution setup: The access token is persisted per user session The token expires The token needs to be persisted somewhere safely The token must be replaced after each UI authentication (per user) The solution must work after restarts The solution must work for multiple instances when deployed to multi-instance deployments. The solution must handle invalid access tokens or missing access tokens Implementation example using Duende Token Management

The Duende Token Management OpenIdConnect Nuget package can be used to implement these requirements for user delegated access tokens. This is not the only way to do this and can be implemented in numerous different ways. With this package, the AddOpenIdConnectAccessTokenManagement can be used to add the token management.

builder.Services.AddOpenIdConnectAccessTokenManagement();

The different HTTP requests or the Razor pages can use the GetUserAccessTokenAsync method to get the access token for each user and session. The SaveTokens is set to true to persist the tokens in the session using a secure cookie per default. This is an option in the AddOpenIdConnect method. The defined scope is used to select the access token.

// token expires, token managment required var accessToken = await HttpContext.GetUserAccessTokenAsync( new UserTokenRequestParameters { Scope = "myscope" });

The AddUserAccessTokenHttpClient method can be used to add a named HttpClient client for the access token and the specific API.

builder.Services.AddUserAccessTokenHttpClient("profileClient", configureClient: client => { client.BaseAddress = new Uri(profileApiBaseUrl!); });

This client can then be used to access the API resource using the access token.

var client = _clientFactory.CreateClient("profileClient"); var response = await client.GetAsync("api/Profiles/photo"); if (response.IsSuccessStatusCode) { var data = await response.Content.ReadAsStringAsync(); if (data != null) return data; return string.Empty; }

When the applications are started, the access token can be used to request data from the downstream API.

Notes

In follow up blogs, I will look at the different ways and the different types of strategies which are used to implement token management in ASP.NET Core web applications.

OAuth Client credentials tokens in web applications Microsoft.Identity.Web delegated access tokens & OBO access tokens Microsoft.Identity.Client application tokens Azure SDK tokens Handling multiple access tokens OAuth Token Exchange for downstream user delegated access tokens Links

Duende.AccessTokenManagement.OpenIdConnect

Duende token management

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/additional-claims

https://github.com/dotnet/aspnetcore/issues/8175

Tuesday, 14. January 2025

Jon Udell

The Configuration Crisis

Perhaps, even though they are not themselves explainable, AIs can help us engineer explainable systems. But I’m not optimistic. It feels like we’re on a path to keep making systems harder for humans to configure, and we keep expanding our reliance on superhuman intelligence to do that for us. The Configuration Crisis and Developer Dependency … Continue reading The Configuration Crisis

Perhaps, even though they are not themselves explainable, AIs can help us engineer explainable systems. But I’m not optimistic. It feels like we’re on a path to keep making systems harder for humans to configure, and we keep expanding our reliance on superhuman intelligence to do that for us.

The Configuration Crisis and Developer Dependency on AI

LLM series at The New Stack


Wrench in the Gears

The Day An Evangelical Christian Convinced ChatGPT I Was A Hippy, Schwab-Aligned Sociopathic Magician

What will come of large language models when they mirror unsettled psyches defined by religious hero complexes into the cloud? We do ourselves and future generations a profound disservice when we choose not to make time to comprehend and interrogate how emerging technologies and narrative flows are being deployed to steer psychological states individually and [...]

What will come of large language models when they mirror unsettled psyches defined by religious hero complexes into the cloud? We do ourselves and future generations a profound disservice when we choose not to make time to comprehend and interrogate how emerging technologies and narrative flows are being deployed to steer psychological states individually and as holon-based collectives through socio-technical, cyberphysical systems and the tokenized attention economy.

I recognize that rather than being a victim of Substack mania once again, I was merely a reflection of another’s discomfort in the world, an obstacle that gave someone a useful anchor point to exert his will and express his agency, however uninformed and misguided. It’s not a good feeling, but an informative lesson nonetheless.

It’s time to wrap our heads around tokenized spirituality and organized religion. My gut tells me Texas is ground zero for integration of the Drucker-Buford metaverse church model with digital community currencies tied to “moral” markets and social impact “charity” in ATT smart cities designed for community “wellness.” 

I don’t think AI should be approached as a digital intercessor for “divine” moral guidance.” I view, web3 systems as linguistic scaffolds quietly mapping the terrain of our souls. Once harvested, our somatic pyschological GPS coordinates can be used ad infinitum to play us like instruments in the coming LARPy animist musical of blockchained cloud minds to solve gnarly problems that can only be untangled by a network of diverse, distributed intelligences – with digital wallets.

Follow your heart, think clearly, and ground yourself. It is easy to get swept away by the Sturm und Drang we generate around ourselves to make the hero roles we inhabit make sense. I’m not going to link to Andrew Corner’s Substack directly, but it’s not hard to find – I’m in the “energy” one. If you go there, fair warning, it’s a slog that’s equal parts disturbing and amusing.

What are we becoming folks? I don’t think the “hybrid” intelligence program is going to be a good look for many of us.

 

At the end of the day this may very well have simply been another signals-intelligence operation. It doesn’t seem like anyone really pays attention to that Substack anyway. If so, I hope there are at least a few useful take aways regarding how we should engage with this systems.

 

https://apparentselves.org/team/pranab-das/

My Santa Barbara map with Alice Bailey.

https://embed.kumu.io/0b2d7e56dffb9dace92cd6f7f09e4a3e#untitled-map?s=bm9kZS05VWJrdHREQg%3D%3D

My Peter Drucker / Bob Buford map of the origins of the Christian mega-church movement.

https://embed.kumu.io/34b47105cbce2883a7cd6639d207e509#untitled-map?s=bm9kZS1DaXRiWmxsMg%3D%3D

My site visits to the Templeton Foundation in Coshohocken, PA – “Money Will Teach You How To Pray”


Doc Searls Weblog

How Facts Matter

Twenty-second in the News Commons series Sixth on the #LAfires Facts don’t matter, or they matter much less than people think—Daniel Kahnemann Facts don’t matter. What matters is how much we hate the person talking—Scott Adams But facts do matter when life and death are on the line. Or when one is recovering from a […]

Twenty-second in the News Commons series
Sixth on the #LAfires

Facts don’t matter, or they matter much less than people think—Daniel Kahnemann

Facts don’t matter. What matters is how much we hate the person talking—Scott Adams

But facts do matter when life and death are on the line. Or when one is recovering from a life-changing situation. To help make the case for that, here are two collections of facts about the #LAfires:

A useful visualization of the CAL FIRE Damage Inspection (DINS) database for the Eaton Fire. A useful visualization of the CAL FIRE Damage Inspection (DINS) database for the Palisades fire.

These are being updated on an ASAP basis by CAL FIRE (the The Department of Forestry and Fire Protection) as they inspect damage across the those two fires’ burned neighborhoods.

Here is a close-up of one section of the Eaton Fire map, with one moused-over pop-out:

The photo link in the pop-out goes here:

The house next door appears undamaged. That’s the green one on the map. By looking at Google Maps, I can see those houses are 3305 and 3310 North Marengo Avenue in Altadena. Note that the map has a search field in the top left corner. When one looks for an address (such as the first of those two), a pop-out appears with this:

“Show more results” and “Zoom to” lead to additional information. Would it help to have a list of all the affected structures, their addresses and conditions? Sure. Exactly seven years ago, after a massive debris flow destroyed much of Montecito, California (one zip code away from our house in Santa Barbara), I posted a list like that in this blog post. My source map was this one (now at the Santa Barbara County Fire Department):

Mousing over those dots popped up an address for each one, and I used those to hand-produce a master list with the addresses for all the structures that had been lost or damaged. The idea was to have a Web page where people could quickly see what may have happened to their house—or the house of somebody they knew, using a simple text search of a Web page. Maybe somebody will do the same thing here.

I bring this up in obedience to my mother’s prime command to my sister and me when we were kids: Make yourself useful.

And that’s what I hope I’m also doing with this post. It’s not just about sharing some maps. It’s about pulling facts away from stories, which I wrote about in my last post. To spare you a click, I said stories are the base format of human interest, and the main product of journalism—and that they have just three requirements: character, problem, and movement.

Stories serve many purposes, of course. One is persuasion. For more on that, check out Win Bigly: Persuasion in a World Where Facts Don’t Matter, by Scott Adams, of Dilbert fame:

The world where facts don’t matter is the digital one we live in now, alongside the physical one where all those homes were lost. In the digital world, the three requirements of stories can be used against journalism as well as by it. Toward both of those uses, I wrote Where Journalism Fails during the first Trump administration, and some of it bears repeating:

We have never seen Donald Trump’s like before, and may never again. His genius at working all three elements is without equal in our time—or perhaps any time. So please, if you can, set your politics aside and just look at the dude through the prism of Story.

Donald Trump spins up stories at least four ways:

Through constant characterization of others, for example with nicknames (“Little Mario,” “Low Energy Jeb,” “Crooked Hillary,” “Sleepy Joe,” “Failing New York Times”) By finding or creating problems, and characterizing those too: “witch hunt,” “fake news,” “illegal ballots,” “Dominion-izing the Vote.” By creating movement via the Roy Cohn and Roger Stone playbook: always attack and counter-attack, sue constantly, and claim victory no matter what. (Roy Cohn was a lawyer Frank Rich felicitously called “The worst human being who ever lived … the most evil, twisted, vicious bastard ever to snort coke at Studio 54.” Talk about character: Cohn was absolutely interesting. As Politico puts it here, “Cohn imparted an M.O. that’s been on searing display throughout Trump’s ascent, his divisive, captivating campaign, and his fraught, unprecedented presidency. Deflect and distract, never give in, never admit fault, lie and attack, lie and attack, publicity no matter what, win no matter what, all underpinned by a deep, prove-me-wrong belief in the power of chaos and fear.”) By playing the ultimate alpha. That’s why he constantly calls himself the winner, and “loser” is one of his favorite epithets. By de-legitimizing facts, truths, norms, and those who traffic in them. Key to this is accusing others of wrongs he commits himself. This is why he labels CNN and other news organizations “fake news” while raising falsity to an art form. Often, his accusations against others are a reliable tell of his guilt for doing the same thing. As for movement, every new problem Trump creates or intensifies is meant to generate an emotional response, which is movement in itself.

Look closely: Trump’s news is deliberate, theatrical, and constant. All of it is staged and re-staged, so every unavoidably interesting thing he says or does pushes the last thing he said or did off the stage and into irrelevance, because whatever he’s saying or doing now demands full attention, no matter what he said or did yesterday.

There is genius to this, and it requires understanding and respect—especially by those who report on it.

You can call this trolling, or earned media coverage, meaning the free kind. Both are true. Comparing Trump to The Mule in Isaac Asimov’s Foundation and Empire also makes sense. (The Mule was a mutant with exceptional influence over the emotions of whole populations. It was by noting this resemblance that I, along with Scott Adams, expected Trump to win in 2016.)

This speaks of two big fails for journalism:

Its appetite for stories proves a weakness when it’s fed by a genius at hogging the stage. It avoids reporting what doesn’t fit the story format. This includes most of reality.

My favorite priest says “Some truths are so deep only stories can tell them,” and I’m sure this is true. But stories by themselves are also inadequate ways to present essential facts people need to know because they exclude what doesn’t fit “the narrative,” which is the modern way to talk about story—and to spin journalists. (My hairs of suspicion stand on end every time I hear the word “narrative.”)

So here’s the paradox: We need to know more than stories can tell, yet stories are pretty much all people are interested in. Character, problem, and movement give shape and purpose to every human life. We can’t correct for it.

That’s why my topic here—a deep and abiding flaw (also a feature) of both journalism and human nature—is one most journalists won’t touch. The flawed nature of The Story itself is not a story. Same goes for  “earned media coverage.” Both are features rather than bugs because they cause much of journalism’s success and debugging them has proven impossible.

Ah, but we can debug the context of journalism, which is the world of facts—especially facts in the physical world. That’s why I’m sharing these CAL FIRE maps. Besides being extremely useful, they highlight how much more needs to be compiled and put in useful forms, so the stories journalism tells can be as fact-based as possible. In an upcoming post, I’ll talk about a new time and history-based way to gather, compile, and archive facts that can maximize their usefulness to journalism in the present, when deadlines rule. If you want to learn a bit about this approach, I outline it in The Future, Present, and Past of News (eleventh in the News Commons series).

Next post: The Blame Game.

Bonus links:

2 Bay Area climate tech startups seek to help first responders in LA County wildfire fight features is a good story on its own, and features old friend Jackson Yip and the work his new company is doing. (NBC Bay Area) As Los Angeles burned, Latino immigrants rushed in to put out fires (LAist) Home Losses From the LA Fires Hasten ‘An Uninsurable Future’ (Time) Los Angeles Needs to Fireproof Communities, Not Just Houses (Wired) Santa Barbara Talks: LA Journalist Tony Pierce on Fires, Media, Uber Column (Noozhawk)

 

 


The Pragmatic Engineer

Cross-platform mobile development

A deep dive into the most popular frameworks: React Native, Flutter, native-first, and web-based technologies, and how to pick the right approach

These days, it seems almost everyone owns a smartphone. In the US, 91% of adults have one, in Europe, this figure is 89%, while in India, Deloitte predicts 75% of adults will have a smartphone by 2026. In total, there are an estimated 4.8 billion smartphone users in the world, which is an incredible number! This means that for tech startups and tech businesses that build consumer products, it’s a baseline expectation for them to be usable on smartphones, and for there to be a mobile app for the product.

So, how do you build mobile apps? There’s plenty of choice: you can build a native mobile app for iOS using Swift or Objective C as a programming language, make one for Android using Java or Kotlin, and of course, you can develop a web app for desktop and mobile web users. All this adds up to three separate codebases and plenty of business logic replication.

Or you can do what startups like social media newcomer Bluesky did: have one codebase that powers the web, native iOS, and native Android apps. For Bluesky, a single developer wrote the initial version of all three apps using React Native and Expo. We cover more on this in the article, Inside Bluesky’s engineering culture.

There are cross-platform frameworks and approaches that offer a way to use a single codebase to power multiple native apps and a website. A decade ago, most cross-platform technologies were in their early stages, but things are shifting; in October 2022, we covered whether more cross-platform development could lead to less native iOS and Android hiring by startups.

Today’s article looks into current cross-platform development approaches, covering:

The ecosystem. Most apps remain fully native, with Flutter and React Native (RN) the clear leaders for cross-platform development. RN is more popular in the US and UK, and apps built with it tend to generate more money.

React Native. The framework of choice for many Meta, Microsoft, Amazon, and Shopify apps, and at places whose web teams work with React.

Flutter. Built and championed by Google, and the framework for most cross-platform apps.

Native-first approaches. Kotlin multiplatform, Swift-based frameworks (Skip, Scade), .NET MAUI (C#), NativeScript (JavaScript), and Unity.

Web-based frameworks. Cordova, Capacitor, Ionic, and Progressive Web Apps.

Choosing the right framework. A mental model for identifying key differences between all these technologies. In the end, most teams choose React Native or Flutter.

The bottom of this article could be cut off in some email clients. Read the full article uninterrupted, online.

Read the full article online

1. The ecosystem

What are the most popular cross-platform frameworks? Interesting research by Appfigures looked at all the top apps on the iOS App Store and Android’s Google Play, peeked into their binaries, and categorized them by the framework used:

The most popular frameworks for iOS and Android apps. Source: Appfigures

Other research published on Statista suggests Flutter and React Native are the most popular choices, followed by Cordova, Unity, and Ionic:

Cross-platform mobile adoption trends (2020-2023) based on a survey of 30,000 respondents. Flutter was used by 46% of respondents, and RN by 35% in 2023. Data source: Statista

Leaders: Flutter and React Native. These are the two most popular frameworks, but it can be tricky to identify which one is the most popular: on iOS, there are more React Native-powered, and on Android, Flutter apps outnumber React Native ones. However, there are simply more Android apps than iOS ones, which is why there are more Flutter apps than React Native ones, overall. React Native has been around since 2015, and Flutter since 2017.

Shrinking: Cordova and Ionic. As per the Statista survey, both frameworks have smaller but shrinking market shares, with about 10-12% of survey participants using them. Their usage is likely more common at companies which were building cross-platform apps before React Native and Flutter emerged, and remain content to ship WebView-based applications.

Growth potential: Kotlin Multiplatform (KMP). This technology has modest adoption rates, but seems to be gaining momentum. JetBrains is investing heavily in it, while the Kotlin language is popular with native mobile developers, especially with Android folks.

React Native or Flutter more popular?

New data from the 2024 Stack Overflow Developer Survey offers pointers. Below is a breakdown of the mobile cross-platform frameworks used by circa 6,500 respondents:

Cross-platform mobile framework usage by developers. Data source: Stack Overflow

From this data, it’s clear that Flutter and React Native are the most popular by a distance, with more users than all other frameworks, combined. But which is the most popular, overall? To find out, let’s slice and dice the data; firstly by narrowing it down to only professional developers by removing hobbyist users:

Framework usage by professional developers of cross-platform apps. Source: Stack Overflow Developer Survey

Flutter is used by slightly more engineers, though the difference is perhaps smaller than before. What happens if we consider per-country usage? Let’s start with the US, UK, Canada and Australia:

Flutter vs React Native usage by country. Source: Stack Overflow Developer Survey

Let’s look at other countries with a higher number of responses – the Netherlands, France, Poland, Brazil, Germany, and India:

Flutter vs React Native usage by country. Source: Stack Overflow Developer Survey

Developer framework preference seems to be linked to location. Germany and India somewhat prefer Flutter, while the US and UK tend towards React Native. I don’t have an explanation of the difference in preference by country; specifically: why Flutter is so much more favored in Germany, but React Native more popular in the US and UK. If you have any thoughts on this, please share in the comment section, below.

Leave a comment

Flutter powers more apps, but React Native ones earn more revenue. It’s hard to accurately measure developers’ preferences, but determining the number of apps using each framework is easier. Appfigures did exactly this by tracking all apps released in a year and found that Flutter was used by 11% of apps released in 2024, while 7% used React Native:

Around 11% of apps released in 2024 used Flutter, 7% used React Native, and 4% Unity. Source: Appfigures

Appfigures also estimates revenue generated by apps. Despite having fewer users, React Native-built apps on aggregate generated more net revenue ($287M) than Flutter apps ($283M), after Apple and Google’s 30% cuts.

The following section looks into each framework.

2. React Native

React Native appears to be the most popular cross-platform framework in the US and UK markets. What are the likely reasons for this popularity?

No need for frontend developers to learn a new language. Developers who know JavaScript or TypeScript will have no trouble getting started with React Native, and devs working with React will find the transition especially easy. As we know, React is the most popular frontend framework, with around 70% of frontend developers using it in 2024, as per the State of Frontend 2024 survey.

Easy enough to hire for. React’s popularity means it’s a bit easier to hire for this skillset, than for native iOS or Android developers. The challenge of hiring native developers was one reason Coinbase moved to React Native in 2021.

Expo. The Expo framework is built to simplify development with React Native, and is especially useful for teams. It helped boost adoption of React Native; without Expo, developers must set up both Android Studio and Xcode, manage emulators and simulators, and manage the native code. React Native’s own documentation recommends using Expo when getting started, as doing so without it makes the work several times more complex. Most of Expo is open source, but some services like Expo Application Services (EAS) have paid tiers.

React Native was open sourced by Facebook, in 2015. As the name suggests, this framework allows creating cross-platform apps using syntax similar to React applications. Here’s how a “Hello, World” app looks like using React Native:

A simple React Native example. Source: React Native documentation

React primitives render to native platform UI elements, which means the compiled app uses the same native UI elements as native iOS and Android apps.

Check out a behind-the-scenes peek into how the React.js documentary was created from two years ago.

Well-known React Native apps

Some popular apps built with this technology include:

Discord. The social platform moved to React Native in 2016 for iOS, and in 2018, two engineers rebuilt the iOS app in React Native at a time when the app already had millions of daily users. The team held off on moving to Android for performance reasons, until in 2022 they moved the Android app to React Native; sharing the same codebase, and keeping iOS and Android-specific UI for each platform.

It’s worth noting Discord often opts for cross-platform technologies: its desktop apps for Windows, Mac, and Linux are based on Electron; a cross-platform desktop technology based on JavaScript, HTML, and CSS.

Discord’s iOS and Android app. Source: Discord

Coinbase moved to React Native in 2021, when it had 56 million users and $1.8B in revenue. Moving off native to RN involved migrating more than 200 screens, and retraining more than 30 native-only engineers. Interestingly, Coinbase claimed that moving to RN reduced their cold start time from 3.8 seconds to 2.5 seconds (still quite a lot, to be fair!), and improved reliablity by increasing the crash-free rate from 99.4% to 99.7%.

A big motivation seemed to be to build more with fewer engineers, and make more consistent app experiences across platforms. The company labelled the transition a success: it reduced the number of codebases from 3 (iOS, Android and Web) to 2 (React Native and React Web), and web engineers could work on the mobile app, and mobile engineers on the web one.

Coinbase app built using React Native. Source: Coinbase

Shopify went all-in on React Native five years ago. Just this week, the company reflected on how it went, sharing:

More productivity: thanks to one codebase powering iOS and Android, and working across both apps

Performance and reliability: all pages have sub-500ms loads and crash-free rates are above 99.9%. Both are impressive numbers!

TypeScript for the win: using TypeScript makes it easy for devs to transfer between React and React Native.

There are downsides: debugging is worse than for native apps, and updating to new React Native versions can be painful.

Shopify employs more than 2,000 software engineers, and is one of the largest tech companies to go all-in on this technology. That it’s working for them, five years later, is a strong vote of confidence. Read more about Shopify’s 5-year reflections on RN.

Meta, Microsoft, and Amazon are not known for fully React-native apps, but do use plenty of RN functionality in their apps:

Meta: React Native’s creator utilizes it heavily for Facebook, Instagram, Ads Manager, Messenger, and Meta Horizon. The company recently shared that more than of its 5,000 engineers work with React code, and Meta apps have some clever React Native-related performance enhancements; for example, in the Facebook app, React Native is initialized when a user visits the first React Native surface, and not on app start. This allows for faster app startup.

Microsoft: the tech giant uses both React and React Native in products like Windows, XBox, Microsoft Office, Microsoft Teams, and other apps. The Windows maker is a heavy user of this technology for native performance and cross-platform code sharing reasons, as it said in 2022. Microsoft has also started to invest heavily in React Native for Windows and MacOS.

Amazon: parts of Amazon Shopping, Amazon Alexa, and Amazon Photos also utilize RN, as per the React Native showcase. Also, Amazon’s Kindle device uses it.

The home screen of Kindle is rendered with React Native, after Amazon migrated away from a Java-based UI in 2022.

The Kindle home screen is rendered using React Native. Source: Goodreader

There are plenty of other, well-known apps building on top of React Native. Bloomberg moved over to this framework shortly after it was launched, back in 2016.

Some high-profile apps that use React Native, even if not built exclusively with it. Source: React Native showcase 3. Flutter

Flutter was launched in 2017 by Google as a solution for cross-platform development. Initially, it targeted Android developers, allowing them to write code once for separate Android and iOS native applications.

Flutter uses the Dart programming language, a strongly-typed language with similar syntax to C# and Java. A clear downside of Flutter is the requirement to learn Dart. However, this is easy to pick up, especially with experience of Java or Kotlin. Here’s what a simple Flutter application looks like:

A simple Flutter app, written in Dart

RN uses native elements, but Flutter uses its own rendering engine called the Impeller rendering engine. This design choice means Flutter offers consistent UI experience across iOS and Android – and even the web! The rendering engine and the programming language of choice are the biggest differences compared to React Native, and native development. Here is how Jordan Bonnet – formerly the first mobile engineer at Uber and current founder of Flutter user onboarding startup fluo.dev – explained this difference to me:

Summarizing the differences between the three platforms. The mental model shared by Jordan Bonnet, cofounder of fluo.dev Performance: where Flutter flies

Read more

Monday, 13. January 2025

Kerri Lemole

Explaining Verifiable Credentials and Open Badges 3.0

Part 2: Issuing Badges In part one of this series, we discussed how the trust model of Open Badges 3.0 differs from earlier versions. Credentials issued as Open Badges 3.0 are based on the W3C Verifiable Credentials data model which describes how claims made online can be proven. To explore this trust model, let’s explore the story of Olivia who has been taking classes at a local commu
Part 2: Issuing Badges

In part one of this series, we discussed how the trust model of Open Badges 3.0 differs from earlier versions. Credentials issued as Open Badges 3.0 are based on the W3C Verifiable Credentials data model which describes how claims made online can be proven.

To explore this trust model, let’s explore the story of Olivia who has been taking classes at a local community college. Olivia is told that with each course she will be awarded and issued a badge that she can use to apply for employment.

Let’s start with what “issuing a badge” means using the most common approaches:

For older Open Badges (versions 0.5 to 2.1): The issuer saves completed course data in the format of an Open Badge that includes Olivia’s email address. When the issuer saves the data, the badge is considered “issued”. This data will be used to populate a web page or a file on the web. This web page or file must be public for Olivia to share online and be considered verifiable. In order for Olivia to do this, she must have an account on the issuing platform associated with the same email address.

For Open Badges 3.0 & W3C Verifiable Credentials: The issuer decides that Olivia should be awarded a badge and provides a secure link for Olivia to retrieve it. Olivia uses a digital wallet to click the secure link which makes a request to the issuing software to produce the badge. The issuing software retrieves and digitally signs the badge data; at this moment the badge has been by definition “issued.” (Prior to this digital signature, the badge itself did not exist.) It is sent to Olivia’s wallet where she claims and secures it, now able to share it privately at her discretion. It is important to note that this credential is hosted locally on Olivia’s device. There is no web page or URL for this credential until Olivia decides to create a public link.

Different Trust Models Older Open Badges are hosted on the web. In this model, trust in the credential is based on the reputation of the badging platform hosting the credentials. Perceptions of trust of websites or platforms can be based on elements like issuer identity confirmation, availability of content, and security of the web site (how websites are secured). Open Badges 3.0 and Verifiable Credentials are digitally signed, portable files. In this model, trust is based on the cryptographic digital signature and privacy. The digital signature in the credential is readable to the verification software, which looks for information indicating which entity signed the credential and if the data has changed since it was signed. Confirmation of the issuing entity’s identity happens later using an issuer registry (to be explained in more detail in a future post).

Olivia has unfettered access to the credential and can share it knowing that when she does, her actions aren’t being tracked or communicated to the issuer. When she shares her credential, it is signed by the digital identity associated with the credential issuer so that the verifier can trust that she has control of the digital identity and the credential.

It’s worth noting that Open Badges v3 and Verifiable Credential issuing platforms could still have public web pages for badges. Olivia may not want all of her badges digitally signed but with Open Badges 3.0 and Verifiable Credentials, she has that choice.

This blog post is Part 2 of a series of content explaining W3C Verifiable Credentials and Open Badges 3.0. Stay tuned for Part 3 — “What does it mean that a badge is digitally signed?”.

For more information on the DCC, including membership, projects, and events, visit our website, wiki, and Linkedin. To receive our newsletter and invitations to webinars and events sign up for our community mailing list.

Explaining Verifiable Credentials and Open Badges 3.0 was originally published in Digital Credentials Consortium on Medium, where people are continuing the conversation by highlighting and responding to this story.

Sunday, 12. January 2025

The Tao of XDI

Is anybody out there?

Is blogging still a thing? If you’re reading this, please comment or like it so I know. I am, at heart, still the XDI Guy. My passion for robust, secure, and scalable distributed data management hasn’t waned. Building one of the first XDI implementations (shout-out to Markus Sabadello, who might have built the only other one), I learned a lot about the challenges and opportunities of distribu

Is blogging still a thing?

If you’re reading this, please comment or like it so I know.


I am, at heart, still the XDI Guy. My passion for robust, secure, and scalable distributed data management hasn’t waned. Building one of the first XDI implementations (shout-out to Markus Sabadello, who might have built the only other one), I learned a lot about the challenges and opportunities of distributed data at scale. Over the years, I’ve reflected on qualities essential for data ecosystems, qualities that are often overshadowed by content-driven ecosystems. For example:

• Caching semantics: Apps need governance and management of caches to respect data ownership while maintaining local operational efficiency.

• Transactionality: Mature data protocols depend on it for consistency and reliability.

• Request batching: Optimizing network requests is vital for performance and scalability.


After years away, I’m ready to dive back in. There are a couple of apps I want to build, and I want to build them on a distributed data platform. My first idea is a fully distributed implementation of Brad deGraf’s BooksWeLike concept—a way to share and discover books that resonate with you. (Brad, if you’re reading this and don’t like the idea, let me know!)


To make this happen, I’ve started scanning the distributed protocol space to see what’s out there. Here’s my initial list of protocols to evaluate:

• AT Protocol

• Nostr

• Solid

• ActivityPub

• Matrix

• IPFS (InterPlanetary File System)

• SSB (Secure Scuttlebutt)

• DID (Decentralized Identifiers)

• Libp2p

• Hypercore

• Waku

• Zero-Knowledge Identity Protocols (ZK Protocols)


What am I missing?

Are there protocols on this list that don’t belong? If so, why? Are there others I should consider? I haven’t started my evaluations yet, so I’m open to your insights. If you’ve built apps on these protocols or have opinions about them, I’d love to hear from you.


I’ll be capturing my journey of discovery here—sharing what I learn, where I stumble, and how I (hopefully) succeed. Let’s make distributed data a reality, by and for the people.


IdM Laboratory

ECDSAに対応したゼロ知識証明の論文がGoogleから出ています

こんにちは、富士榮です。 AAMVAのモバイル運転免許証のガイドラインでも触れましたが、mdocやSD-JWTのリンク可能性へ対応するためには今後ゼロ知識証明が大切になります。 年末にGoogleの研究者が Anonymous credentials from ECDSA というタイトルでペーパーを出しています。 https://eprint.iacr.org/2024/2010 AIでイラスト生成すると色々とおかしなことになって面白いですねw アブストラクトの中からポイントを抜粋すると、従来のBBS+では暗号スイートへの対応に関する要件が厳しかったのでレガシーで対応できるようにECDSAでもできるようにしたよ、ということのようですね。 Part of the difficulty arises because schemes in the literature,

こんにちは、富士榮です。

AAMVAのモバイル運転免許証のガイドラインでも触れましたが、mdocやSD-JWTのリンク可能性へ対応するためには今後ゼロ知識証明が大切になります。

年末にGoogleの研究者が

Anonymous credentials from ECDSA

というタイトルでペーパーを出しています。

https://eprint.iacr.org/2024/2010

AIでイラスト生成すると色々とおかしなことになって面白いですねw

アブストラクトの中からポイントを抜粋すると、従来のBBS+では暗号スイートへの対応に関する要件が厳しかったのでレガシーで対応できるようにECDSAでもできるようにしたよ、ということのようですね。

Part of the difficulty arises because schemes in the literature, such as BBS+, use new cryptographic assumptions that require system-wide changes to existing issuer infrastructure.  In addition,  issuers often require digital identity credentials to be *device-bound* by incorporating the device’s secure element into the presentation flow.  As a result, schemes like BBS+ require updates to the hardware secure elements and OS on every user's device.

その難しさの一部は、BBS+などの文献に記載されているスキームが、既存の発行者インフラストラクチャにシステム全体にわたる変更を必要とする新しい暗号化前提条件を使用していることに起因しています。さらに、発行者は、デバイスのセキュアエレメントを提示フローに組み込むことで、デジタルID認証をデバイスに紐づけることを求めることがよくあります。その結果、BBS+のようなスキームでは、すべてのユーザーのデバイスのハードウェアセキュアエレメントとOSのアップデートが必要になります。

In this paper, we propose a new anonymous credential scheme for the popular and legacy-deployed Elliptic Curve Digital Signature Algorithm (ECDSA) signature scheme.  By adding efficient zk arguments for statements about SHA256 and document parsing for ISO-standardized identity formats, our anonymous credential scheme is that first one that can be deployed *without* changing any issuer processes, *without* requiring changes to mobile devices, and *without* requiring non-standard cryptographic assumptions.

本稿では、広く普及し、レガシーシステムにも導入されている楕円曲線デジタル署名アルゴリズム(ECDSA)署名スキームのための新しい匿名クレデンシャルスキームを提案する。 SHA256に関する効率的なzk引数と、ISO標準化されたIDフォーマットの文書解析を追加することで、この匿名クレデンシャルスキームは、発行者側のプロセスを変更することなく、モバイルデバイスの変更を必要とすることなく、また、非標準の暗号化前提条件を必要とすることなく実装できる初めてのスキームです。

 なかなか期待できますね。生成速度に関してもこのような記載があります。

Our proofs for ECDSA can be generated in 60ms.  When incorporated into a fully standardized identity protocol such as the ISO MDOC standard, we can generate a zero-knowledge proof for the MDOC presentation flow in 1.2 seconds on mobile devices depending on the credential size. These advantages make our scheme a promising candidate for privacy-preserving digital identity applications.

当社のECDSAの証明書は60ミリ秒で生成できます。ISO MDOC標準のような完全に標準化されたアイデンティティプロトコルに組み込まれた場合、クレデンシャルのサイズにもよりますが、モバイルデバイス上でMDOCプレゼンテーションフロー用のゼロ知識証明書を1.2秒で生成できます。これらの利点により、当社の方式はプライバシー保護型デジタルアイデンティティアプリケーションの有望な候補となっています。

mdocのプレゼンテーション時にゼロ知識証明を1.2秒で生成、このくらいなら実用性がありそうですね。

論文の本文もPDFで閲覧できるようになっているので、おいおい見ていこうと思います。

 

 


Saturday, 11. January 2025

Werdmüller on Medium

Building an open web that protects us from harm

It’s not enough to be neutral. We must be allies. Continue reading on Medium »

It’s not enough to be neutral. We must be allies.

Continue reading on Medium »


Michael Ruminer

AI RAG with LlamaIndex, Local Embedding, and Ollama Llama 3.1 8b

In this post, I cover using LlamaIndex LlamaParse in auto mode to parse a PDF page containing a table, using a Hugging Face local embedding model, and using local Llama 3.1 8b via Ollama to perform naive Retrieval Augmented Generation (RAG). That’s a mouthful. I won’t go into how to setup Ollama and Llama 3.1 8b; this post assumes it is running. First off, you can find the code for this in m

In this post, I cover using LlamaIndex LlamaParse in auto mode to parse a PDF page containing a table, using a Hugging Face local embedding model, and using local Llama 3.1 8b via Ollama to perform naive Retrieval Augmented Generation (RAG). That’s a mouthful. I won’t go into how to setup Ollama and Llama 3.1 8b; this post assumes it is running.

First off, you can find the code for this in my LlamaIndex_Test Github repo under Test1/src folder. At the time of this writing there is a Test0 and a Test1. To see the post about Test0 code see Using LlamaIndex — Part 1 OpenAI.

The code uses a .env and load_dotenv() to populate the needed LLAMA_CLOUD_API_KEY. I recommend that if you have an OPENAI_API_KEY entry in the .env that you comment it out for this experiment to prove to yourself that the embedding and LLM are local and not OpenAI. See the part 1 post for more details on the LLAMA_CLOUD_API_KEY.

#OPENAI_API_KEY=YOUR_API_KEY
LLAMA_CLOUD_API_KEY=YOUR_API_KEY

The pip install dependencies I put as comments at the top of the python file. There is also a requirements.txt for the project as a whole that covers all the “Test” experiments package requirements.

# pip install llama-index-embeddings-huggingface
# pip install llama-index-llms-ollama
# pip install llama-index-core llama-parse llama-index-readers-file

The nice thing about LlamaIndex LlamaParse is that it provides an auto mode that will use premium mode when specified criteria are met. In this experiment, I have set auto mode on with triggers for mode change on in- page images or tables. Also, to save on parsing credit usage in LlamaParse and because, for this example, it is all that is needed, I have set the pages to be parsed to PDF page 9 only (note that PDF page 9 is target page 8 to LlamaParse because it uses a 0 based page index). Like the part 1 post, I am using an output of markdown because it provides greater context to the LLM; though, I did try it with result_type=text and received the proper query response despite the answer to the query being in a table.

# set LlamaParse for markdown output and auto_mode only parsing page 8
parser = LlamaParse(
result_type="markdown",
auto_mode=True,
auto_mode_trigger_on_image_in_page=True,
auto_mode_trigger_on_table_in_page=True,
target_pages="8",
verbose=True
)

So that you don’t have to open the PDF document that gets parsed to understand the input below is a screenshot of the page.

As in part 1, I use LlamaParse.load_data to read the page and parse it. Since it has a table in-page and we are in auto mode it will automatically use Premium mode to potentially better handle the page and table. This will cause the page parse to cost 15 credits on LlamaIndex. Note that LlamaIndex will cache your parsed page for 48 hours unless you specify otherwise or change the parse parameters which allows you to run the code more than once and only get the credit cost once. I did try using the default “accurate” mode by removing the auto_mode parameters on the LlamaParse and it still parsed the table properly and returned the proper answer to the query — but this is a sample for showing the use of “auto mode” so just pretend that is not the case.

If you want to see the output of the parser, uncomment the print command after the documents variable is populated. I like to then paste it into a markdown viewer to see it as rendered markdown output. See the below image for that output.

with open(f"../../sample_docs/{file_name}", "rb") as file_to_parse:
# LlamaParse will cache a parsed document 48 hours if the parse parameters are not changed
# thus not incuring additional parse cost if you run this multiple times for testing purposes
# see the history tab in the LlamaParse dashboard for the project to confirm that
# credits used = 0 for subsequent runs
#
# must provide extra_info with file_name key when passing file object
documents = parser.load_data(file_to_parse, extra_info=extra_info)
# to manually check the output uncomment the below
#print(documents[0].text)

I like to set the default settings for LLM and embedding model so that I don’t need to pass them around as parameters. Here is where I set the embedding model to a Hugging Face provided model. When you run the python for the first time it will pull down the embedding model automatically — nice!

# set the default embeddings and llm so that it doesn't have to be passed around
Settings.embed_model = HuggingFaceEmbedding(model_name="BAAI/bge-small-en-v1.5")
Settings.llm = Ollama(model="llama3.1:latest", request_timeout=120.0)

The next part of the code does the same that it did in Part 1 except that this time the VectoreStoreIndex and the query engine use the models I set in the Settings singleton versus the LlamaIndex default of OpenAI.

# index the parsed documents using the default embedding model
index = VectorStoreIndex.from_documents(documents)

# generate a query engine for the index using the default llm
query_engine = index.as_query_engine()

# provide the query and output the results
query = "What is the latency in seconds for Nova Micro?"
response = query_engine.query(query)
print(response)

If all goes well you should get the response output as 0.5 and if you look back at the table from the page you’ll see that is correct.

(.venv) PS C:\python\LlamaIndex_Test\Test1\src> python parse_ollama.py
Started parsing the file under job_id 37dce328-aaa7-499b-afe9-498c32b63944
.0.5

To validate that the value was coming from the RAG provided PDF page and not the the LLMs inherent “knowledge”, I asked a similar question via the command line to Ollama without providing the RAG context— output below:

PS C:\temp> ollama run llama3.1:latest "what is the latency in seconds for Nova Micro Amazon LLM model?"
I don't have access to specific information about the latency of the Nova Micro Amazon LLM (Large Language Model)
model. The details regarding models like this, especially concerning their performance metrics such as latency,
are typically available from the developers or through official documentation and may be subject to change. If
you're looking for accurate and up-to-date information on this topic, I recommend checking directly with Nova
Micro's resources or contacting them for the most current data.

There you have it. But I am not done quite yet in reporting my results. In LlamaIndex’s examples, they used this PDF but used PDF page 1 which contains an image. See below an image of the page.

They use this page to demonstrate how LlamaParse in auto mode moves into premium mode for the page parsing because of the image and then creates a mermaid diagram from the image because it recognizes the image is of a diagram. Below is what they report as the outcome in part.

# The Amazon Nova Family of Models:
# Technical Report and Model Card

Amazon Artificial General Intelligence

```mermaid
graph TD
A[Text] --> B[Nova Lite]
C[Image] --> B
D[Video] --> E[Nova Pro]
F[Code] --> E
G[Docs] --> E
B --> H[Text]
B --> I[Code]
E --> H
E --> I
J[Text] --> K[Nova Micro]
L[Code] --> K
K --> M[Text]
K --> N[Code]
O[Text] --> P[Nova Canvas]
Q[Image] --> P
P --> R[Image]
S[Text] --> T[Nova Reel]
U[Image] --> T
T --> V[Video]

style B fill:#f9f,stroke:#333,stroke-width:2px
style E fill:#f9f,stroke:#333,stroke-width:2px
style K fill:#f9f,stroke:#333,stroke-width:2px
style P fill:#f9f,stroke:#333,stroke-width:2px
style T fill:#f9f,stroke:#333,stroke-width:2px

classDef input fill:#lightblue,stroke:#333,stroke-width:1px;
class A,C,D,F,G,J,L,O,Q,S,U input;

classDef output fill:#lightgreen,stroke:#333,stroke-width:1px;
class H,I,M,N,R,V output;
```

Figure 1: The Amazon Nova family of models

When I tried this I did not get the same outcome from the parse. It did not even attempt to generate a mermaid diagram. I received the following output for the diagram image section; far from their professed output.

The Amazon Nova Family of Models:
Technical Report and Model Card
Amazon Artificial General Intelligence
Nova
Lite Nova
Nova Micro Ix
Pro <l> <l > </>
A Ix
</>
=
Nova Nova
Canvas Reel
Figure 1: The Amazon Nova family of models

In the experiment, everything is local except LlamaIndex which is nice. I hope that this example is of use to you.

Friday, 10. January 2025

Wrench in the Gears

How Gregg Braden Led Me To Share My Thoughts on Quantum Coherence, Collective Computing, and Tokenized Spirituality

This is a video I posted yesterday. And a follow up to clarify certain points. Sorry, I guess the youtube AI choose the “hands up” screenshot for the preview image. I do talk a lot with my hands. Here is a link to Joseph Gonzalez’s blog post on emergent information communication systems. Here are two [...]

This is a video I posted yesterday.

And a follow up to clarify certain points. Sorry, I guess the youtube AI choose the “hands up” screenshot for the preview image. I do talk a lot with my hands.

Here is a link to Joseph Gonzalez’s blog post on emergent information communication systems.

https://bantamjoe.com/2025/01/08/emergent-intelligent-communication-system/

Here are two related links (here and here) in my blog about web3 tokens as a form of symbolic language.

https://wrenchinthegears.com/2023/02/18/gods-eye-view-part-4-the-language-of-heartless-charity/ https://wrenchinthegears.com/2023/10/01/emergent-thoughts-on-web3-game-mechanics-and-tokens-as-a-computational-language-triggered-by-the-film-arrival/ https://wrenchinthegears.com/wp-content/uploads/2025/01/Invitation-to-Ontopoetics-Freya-Mathews.pdf

Below are several maps related to topics discussed for reference / exploration.

J.G. Bennett’s “lifelong learning communities” based on Gurdjieff’s principles in Surrey, Gloucestershire, and West Virginia.

https://embed.kumu.io/55da1b35ad86a647f722575c3f6a5c88#untitled-map?s=bm9kZS1FcnlES2JIYQ%3D%3D

Peter Drucker, Claremont, management theorist, and megachurch promoter with Texas cable TV mogul Bob Buford.

https://embed.kumu.io/840621d7eeadc3a92eb1b1f58848f2d6#untitled-map?s=bm9kZS1DaXRiWmxsMg%3D%3D

Jay Daniels, emeritus professor of religion and advocate of process philosophy from Hendrix College in Conway, Arkansas not far from Petit Jean State Park and Winthrop Rockefeller’s ranch.

https://embed.kumu.io/d0ce16570c05d58b2dcf14474e7c8482#untitled-map?s=bm9kZS1rU2tSTHc3VQ%3D%3D

Macy Conferences and Tavistock in relation to research into the psychology of group dynamics, cybernetics, and cognition.

https://embed.kumu.io/80de775f15b564883921a5ec7daf869b

Tokenized creativity and social prescribing in the context of “pay for success” wellness metrics and public “health.”

https://embed.kumu.io/ed4cd18205e44f10f71a103c7dafb250#untitled-map?s=bm9kZS1idlRxbk81cQ%3D%3D

Parallel community currencies and socio-technical systems.

https://embed.kumu.io/044479643a1b94c072b57dbd21ce8e7f

Tokenized emotional cartography linked to crowd-sourced computation.

https://embed.kumu.io/c93cb83f097f7f28ff88ade75d965919

 

Tokenized prediction markets in public policy linked to distributed cognition / swarm intelligence.

https://embed.kumu.io/789febca28a348cfa3cde24f44d2571e#untitled-map?s=bm9kZS1YNzJkZkgwUQ%3D%3D

Rise of second order cybernetics applied to the tokenized evolution of social systems under web3 spatial computing.

https://embed.kumu.io/5783ad4a7b17672e7cf8959fd5339231#untitled-map?s=bm9kZS1uUTE0MTd4cA%3D%3D

Aldous Huxley’s ties to psychedelics, human potential, mysticism, and the formation of AA.

https://embed.kumu.io/c4ecf9784bf71a6a64050c6c2d7be94b#untitled-map?s=bm9kZS10bEZNbEQ3Ng%3D%3D

Lots to chew on. Have at it!

 

 

 

Thursday, 09. January 2025

Phil Windleys Technometria

Authorization Matters

In 2013, poor authorization practices led to one of the largest data breaches in history.

In 2013, poor authorization practices led to one of the largest data breaches in history. Over a three-week period, hackers stole 40 million credit and debit card accounts from retail giant Target by exploiting the account of an HVAC contractor. The attack began with an email-based phishing scam that tricked an employee at the HVAC company into revealing their credentials. As a vendor to Target, the HVAC company had legitimate access to Target’s systems. Using the stolen credentials, the hackers infiltrated Target’s network and installed malware on the retailer’s point-of-sale systems, enabling them to collect customer data. The breach resulted in direct costs to Target of nearly $300 million, along with reputational damage that is difficult to quantify.1

The Target breach underscores the critical importance of not only knowing who is accessing your systems (authentication) but also controlling what they can access (authorization). The HVAC vendor had access to Target’s systems for electronic billing, contract submission, and project management. However, the hackers were able to extend this access beyond those legitimate uses to reach systems used to update point-of-sale devices. Target’s failure to properly restrict access to critical systems created a significant vulnerability that the hackers exploited.

But I don’t want you to get the idea that authorization is just about securing IT systems—it’s also fundamental to how modern cloud applications function, enabling features that wouldn’t be possible otherwise. For example, services like Google Docs and Dropbox rely on authorization to allow users to share documents with specific people while restricting access to others. Without this capability, these applications would not be possible.

Another example is Amazon Web Services (AWS), where authorization enables Amazon to securely provide hundreds of cloud services to millions of customers at scale in a cost-effective manner. As a global distributed system taking advantage of multi tenancy to service millions of customers, AWS uses a sophisticated policy-based authorization system to help customers control access to the services running inside their accounts.

Several trends make authorization a more important topic that it has been:

More and more software is being delivered as a service (so called Software as a Service, or SaaS). As we’ve discussed cloud-based services can’t provide the needed levels of functionality and security without strong authorization systems.

Perimeter-based security architectures like firewalls are giving way to zero-trust architectures. Rather than assuming everyone inside the perimeter is trusted, zero-trust systems assume breach and authorize every access. This isn’t possible without flexible authorization systems that can determine whether to grant access based on the context of the request.

Internet of Things (IoT) and interconnected devices mean that more and more computer systems are talking to each other on their owner’s behalf. Restricting their access to the role they play protects them and prevents them from becoming a vector that hackers can exploit to break into other sensitive systems.

Regulatory compliance is yet another reason why authorization is increasingly important. Laws like the Health Insurance Portability and Accountability Act (HIPAA) and General Data Protection Regulation (GDPR) require that access to personal information be carefully controlled so that only the right people and systems can use it. Beyond controlling access, these laws also require that you be able to audit access to show compliance.

In addition to these, the rise of GenAI and particularly AI agents that can act on your behalf pour gasoline on the smoldering identity industry interest in authorization. Am I talking to a human? Does this agent have authority to make a doctor's appointment on the patient's behalf? These and other questions mean that making good authorization decisions, knowing what decisions were made, and easily incorporating authorization infrastructure into your apps and infrastructure is vital.

Notes

The story is interesting beyond the fact that it highlights the need to properly manage access. Target’s response, or rather lack of one, provides several important security lessons: Cyber Case Study: Target Data Breach provides more details

Photo Credit: Hacker Stealing Credit Cards from DALL-E (public domain). Prompt: Draw a wide picture of a hacker stealing credit cards from an online store.


The Pragmatic Engineer

The Pulse #119: Are LLMs making StackOverflow irrelevant?

Also: Apple fires staff over fake charities scam, AI models just keep improving, a middle manager burnout possibly on the horizon, and more.

The Pulse is a series covering insights, patterns, and trends within Big Tech and startups. Notice an interesting event or trend? Send me a message.

Today, we cover:

Industry pulse. Fake GitHub stars on the rise, Anthropic to raise at $60B valuation, JP Morgan mandating 5-day RTO while Amazon struggles to find enough space for the same, Devin less productive than on first glance, and more.

Are LLMs making StackOverflow irrelevant? Fresh data shows that the number of questions asked on StackOverflow are as low as they were back in 2009 – which was when StackOverflow was one years old. The drop suggests that ChatGPT – and LLMs – managed to make StackOverflow’s business model irrelevant in about two years’ time.

Apples fires staff over fake charities scam. In order to get around $4,000 per year in additional tax cuts, six Apple employees tried to defraud Apple – and the IRS. They were caught, fired, and now face prosecution. A reminder that getting “clever” with corporate perks can wreck otherwise lucrative careers at Big Tech.

AI models just keep improving rapidly. Two months after wondering whether LLMs have hit a plateau, the answer seems to be a definite “no.” Google’s Gemini 2.0 LLM and Veo 2 video model is impressive, OpenAI previewed a capable o3 model, and Chinese startup DeepSeek unveiled a frontier model that cost less than $6M to train from scratch.

Middle manager burnout incoming? A Forbes article suggests a broader middle manager burnout to come across most professional sectors. This could simply be a consequence of higher interest rates, teams growing less, and more pressure on managers. It’s tougher to be an engineering manager, than it has been during the 2010-2022 period, that’s for sure.

1. Industry pulse Fake GitHub stars

For years, GitHub stars have been used by a proxy for VC investors to gauge how much traction an open source project has. Projects with high traction were much more likely to attract investment because investors assumed that developers’ interest can eventually be monetized.

So, if an open source project could increase its chance of attracting funding by getting more stars, what do you think happened? According to recent research by researchers at Carnegie Mellon University, security platform Socket, and North Carolina State University, it’s exactly what you’d expect: projects are faking their GitHub stars.

The counterfeiting of GitHub stars seems to have exploded ~100x since just last year. Here’s data from the paper:

Source: 4.5 Million Suspected Fake Stars in GitHub

The report finds fake stars being used to promote malware repositories, video game cheats, and crypto bots. Some are likely used for growth hacking to secure investment, while some are deployed for “resume fraud:” making it seem a software engineer’s side project on GitHub is a lot more popular than it actually is!

This research is a reminder that GitHub stars can be easily purchased, and more repos are doing just this. GitHub does its part to make it harder to create and operate accounts to buy/sell stars: it has Trust & Safety and Platform Health groups that battle account spam and account farming and are known to suspend accounts that abuse its terms and conditions. Still, this is a cat-and-mouse game, and the ability to buy stars to boost perceived repo popularity is not going anywhere. The more GitHub cracks down on this, the more expensive purchasing those additional stars will likely become, though.

Update on 12 Jan 2025: updated the last sentence that previously stated that GitHub has no incentive to crack down on purchased stars — based on more details I received on what GitHub is doing to fight against such bad actors.

Anthropic to raise at massive $60B valuation?

Read more


Just a Theory

Sqitch 1.5.0

Sqitch v1.5.0: out now in all the usual places!

Released yesterday: Sqitch v1.5.0. This version the MySQL driver DBD::mysql with DBD::MariaDB, both for its better backward compatibility with MySQL as well as MariaDB driver libraries and for its improved Unicode handling. The Docker image likewise switched to the MariaDB mysql client. I expect no compatibility issues, but you never know! Please file an issue should you find any.

V1.5.0 also features a fixes for Yugabyte deployment, Oracle error handling, existing Snowflake schemas, connecting to MySQL/MariaDB without a database name, and omitting the checkit MySQL/MariaDB function when the Sqitch user lacks sufficient permission to create it. Sqitch now will also complain when deploying with --log-only and a deployment file is missing.

Find it in the usual places:

sqitch.org GitHub CPAN Docker Homebrew

Many thanks to everyone who has enjoyed using Sqitch and let me know in person, via email Mastodon, bug reports, and patches. It gratifies me how useful people find it.

More about… Sqitch MariaDB MySQL Yugabyte Oracle Snowflake

Wednesday, 08. January 2025

The Pragmatic Engineer

Confessions of a Big Tech recruiter

In today’s episode of The Pragmatic Engineer, I’m joined by Blake Stockman, former tech recruiter at Google, Meta, Uber, and YC.
Stream the Latest Episode

Available now on Spotify, YouTube and Apple. See the episode transcript at the top of this page.

Brought to You By

DX — DX is an engineering intelligence platform designed by leading researchers.

Vanta — Automate compliance and simplify security with Vanta.

In This Episode

In today’s episode of The Pragmatic Engineer, I catch up with one of the best tech recruiters I’ve had the opportunity to work with: Blake Stockman, a former colleague of mine from Uber. Blake built a strong reputation in the recruiting world, working at tech giants like Google, Meta, and Uber and Flexport. He also spent time with Y Combinator and founded his agency, where he helped both large tech companies and early-stage startups find and secure top talent. A few months ago, Blake did a career pivot: he is now studying to become a lawyer. I pounced on this perfect opportunity to have him share all that he’s seen behind-the-scenes in tech recruitment: sharing his observations unfiltered.

In our conversation, Blake shares recruitment insights from his time at Facebook, Google, and Uber and his experience running his own tech recruitment agency. We discuss topics such as:

• A step-by-step breakdown of hiring processes at Big Tech and startups
• How to get the most out of your tech recruiter, as a candidate
• Best practices for hiring managers to work with their recruiter
• Why you shouldn’t disclose salary expectations upfront, plus tips for negotiating
• Where to find the best startup opportunities and how to evaluate them—including understanding startup compensation
• And much more!

Takeaways

My biggest takeaways from this practical conversation:

1. Almost every offer has room for negotiation. So if you get extended an offer, consider negotiating at least a little! In Blake’s words:

“Try to understand what it is that the recruiter is working with. They're going to ask you to state what your compensation expectations are. Every candidate is best suited by responding respectfully: “I would like to see an offer that the company thinks constitutes the value that I have to bring to the table.” And sticking with this.

If any company is not willing to give you an offer because you didn't state your compensation expectations upfront — which I've never ever seen! — they're probably not the right company for you to work at. Ask them to put you a fair and honest offer on the table. “

2. GenAI is already changing recruitment. Here is how Blake describes the change he sees:

“Just like software engineers are realizing you can do some amazing things very quickly with AI: the same is true for recruitment.

Everyone on the job market has gotten messages from a recruiter where it feels like a pretty generic template. Something along the lines of “here’s some basic information, here’s the opportunity, please respond if you’d like.” The recruiter sends the same template to all candidates in an area with the “senior software engineer” title. I expect all of this to be automated by AI — at least for the basic things. A lot of the repetition, the generic work that recruiters do: a lot of it could be automated.

And then we see AI playing a more focused role in note taking, synthesizing information, consolidating notes across multiple interviewers.

Recruitment is becoming more automated and less personal, up until much later stages in the process. This is a generic trend, but AI is speeding it up.”

We covered more on how GenAI is impacting tech hiring in the deepdive How GenAI is reshaping tech hiring.

3. The larger a company, the more decentralized hiring decisions are. Startups and small companies typically have hiring managers — or founders! — make the hiring decision. However, larger tech companies often have hiring committees deciding whether an offer should be extended.

This is one reason smaller companies can move a lot faster in hiring. It also makes it trickier to figure out why exactly a larger company might have said “no” after an onsite round that felt went well: the input for the decision could have come from people not even in the loop!

4. A tip for engineering leaders ahead of a hiring drive: create a ‘hiring talent map!’ This is how Blake describes this:

“For example, when we were hiring for the Payments team: we'll decided that we needed to find a couple candidates working at companies where they have relevant Payments experiences, or they can ramp up quickly. We needed people who had understanding of our domain knowledge. So we mapped out these companies.

We then looked at this map, and asked: “okay, but which ones do we think also have like really good engineering talent that also, you know, would plant in really well with a broader engineering culture here?”

Based on these, we put together a more structured outreach plan. This helped us hire more focused, and faster.”

For more advice on preparing for tech interviews: take a look at a video I did a few years back: Confessions from a Big Tech Hiring Manager: Tips for Software Engineering Interviews

The Pragmatic Engineer deepdives relevant for this episode

How GenAI is reshaping tech hiring

Hiring software engineers

Hiring an Engineering Manager

Hiring Junior Software Engineers

Timestamps

(00:00) Intro

(01:40) Tips for working with recruiters

(06:11) Why hiring managers should have more conversations with recruiters

(09:48) A behind-the-scenes look at the hiring process at big tech companies

(13:38) How hiring worked at Uber when Gergely and Blake were there

(16:46) An explanation of calibration in the recruitment process

(18:11) A case for partnering with recruitment

(20:49) The different approaches to recruitment Blake experienced at different organizations

(25:30) How hiring decisions are made

(31:34) The differences between hiring at startups vs. large, established companies

(33:21) Reasons desperate decisions are made and problems that may arise

(36:30) The problem of hiring solely to fill a seat

(38:55) The process of the closing call

(40:24) The importance of understanding equity

(43:27) Tips for negotiating

(48:38) How to find the best startup opportunities, and how to evaluate if it’s a good fit

(53:58) What to include on your LinkedIn profile

(55:48) A story from Uber and why you should remember to thank your recruiter

(1:00:09) Rapid fire round

Resources & Mentions

Where to find Blake Stockman:

• LinkedIn: https://www.linkedin.com/in/blake-stockman/

Mentions during the episode:

• The Software Engineer's Guidebook: Audiobook: https://gergelyorosz.gumroad.com/l/dlzxi

• The Staff Engineer's Path: A Guide for Individual Contributors Navigating Growth and Change: https://www.amazon.com/Staff-Engineers-Path-Individual-Contributors/dp/1098118731/

• Flexport: https://www.flexport.com/

• YCs Work at a Startup site: https://www.workatastartup.com/

• Andreessen Horowitz’s portfolio page: https://a16z.com/portfolio/

• The Midas List: The World's Best Venture Capital Investors In 2024: https://www.forbes.com/lists/midas/

• The Three-Body Problem: https://www.amazon.com/Three-Body-Problem-Cixin-Liu/dp/0765382032

• State of the software engineering job market in 2024: https://newsletter.pragmaticengineer.com/p/state-of-eng-market-2024

• Hiring software engineers and engineering leaders from Big Tech (Part 1): https://newsletter.pragmaticengineer.com/p/hiring-from-big-tech

• Hiring software engineers and engineering leaders from Big Tech (Part 2): https://newsletter.pragmaticengineer.com/p/hiring-from-big-tech-part-2

Production and marketing by https://penname.co/. For inquiries about sponsoring the podcast, email podcast@pragmaticengineer.com.


Heres Tom with the Weather

Hockey Trivia

As I just registered for a new season of beer league hockey starting this weekend, I thought about an episode of C’est comme ça que je t’aime I recently watched which is set in 1974 Sainte-Foy, Quebec City. Nearly all the 1974 Quebec cultural references are new to me and in this episode, there is an adventure in a hockey arena and you can pause the video in a few places and see signage in the

As I just registered for a new season of beer league hockey starting this weekend, I thought about an episode of C’est comme ça que je t’aime I recently watched which is set in 1974 Sainte-Foy, Quebec City. Nearly all the 1974 Quebec cultural references are new to me and in this episode, there is an adventure in a hockey arena and you can pause the video in a few places and see signage in the background for a junior hockey team called Ste. Foy Couillard that only existed from 1972-1974.

You can watch it at ICI Tou.tv (in Canada) or Amazon Prime (in U.S.).


Moxy Tongue

OYO AI

 With over 1000 AI communities deployed in 2024, the next AI cohort begins.. Coding, Computer Science, Artificial Intelligence, Entrepreneurial Skill Development, Teacher PD,  With mentor support of all learners, students and teachers. Unlimited learning by design: (own root)  OYO®  AI  by kidOYO®  at OYOclass.com, Educati

 With over 1000 AI communities deployed in 2024, the next AI cohort begins..












Coding, Computer Science, Artificial Intelligence, Entrepreneurial Skill Development, Teacher PD, 

With mentor support of all learners, students and teachers. Unlimited learning by design: (own root) 

OYO®  AI  by kidOYO®  at OYOclass.com, Educational Software Services.

Tuesday, 07. January 2025

Werdmüller on Medium

46 books

Every book is a portal out of here. Continue reading on Medium »

Every book is a portal out of here.

Continue reading on Medium »


The Pragmatic Engineer

Bug management that works (Part 2)

Making time for bug fixing, dedicated ‘goalies’, preventing bugs, and how to create a culture quality-focused culture which minimizes them

How do you deal with bugs in the software products you build? This topic is under-discussed, even though almost all software engineers deal with software bugs and regressions every week.

We reached out to two dozen engineering leaders and software engineers to learn about current, cutting-edge approaches to bug management. In Part 1 of this mini-series, we covered:

Catching bugs

Reporting bugs

Bug triage

“Don’t manage bugs: fix them!”

Zero-bugs policy

In this second, concluding article on this topic, we look into what typically happens after the bug triage stage:

Create time and space for bug fixing. Bug expiration dates, weekly ‘bug pickups’, bug fixing time budgets, can all help.

Dedicated bug fixers: ‘goalies’. An engineer dedicated to bug fixing for a couple of weeks may be known as a support engineer”, “being on bug duty”, “first line”. It’s a popular approach with its own challenges.

Fixing bugs properly. A root cause analysis to fix underlying causes is a pragmatic approach. Several teams opt to treat high-priority bugs as incidents.

Prevention is better than cure. Automated tests like unit, integration, end-to-end, and performance tests, coupled with CI/CD is a common approach. So is investing in other bug prevention approaches.

A quality culture for fewer bugs. It takes effort from engineering leadership to create a culture that prioritizes quality. At companies with this focus, tactics for this include bug metrics, operational reviews, and engineers not asking permission to do bug fixing.

Related deep dives on this topic to check out:

Shipping to production

Incident review and postmortem best practices

Healthy oncall practices

How Big Tech does Quality Assurance (QA)

QA approaches across the industry

Thank you to everyone who contributed insights to this article:

Anaïs van Asselt (senior QA engineer), Andrea Sipos (product leader, Felix Hageloh (lead engineer), Gus Fune (CTO), Hugo Valante (tech lead), Ignatius Nothnagel (Director of Platform Engineering), Ivan Tchomgue (People manager/product owner), Jason Diller (VP of Engineering), Jayesh Varma (Lead Android engineer), Marin Dimitrov (Head of Engineering), Matteo Galli (CTO), Maya Ziv (senior software engineer), Owain Lewis (Director of Engineering), Piotr Zolnierek (CTO), Neil Oler (senior software engineer), Rebecca Frost (QA leader), Rebecca Holm Ring (engineering leader), Ruben Weijers (engineering manager), Ryan Hanni (Director of Engineering), Serdar Biyik (engineering manager), Walter de Bruijn (Head of Engineering Productivity)

The bottom of this article could be cut off in some email clients. Read the full article uninterrupted, online.

Read the full article online

1. Create time and space for bug fixing

Fixing bugs when they happen is the single best approach, but unfortunately not always realistic. The next best thing is to ensure there’s enough time for engineers to fix problematic issues. Below are some approaches.

Fix bugs on the go

Several engineering leaders at smaller companies say their preferred approach is to simply fix bugs as they occur:

“We do continuous bug fixing: always balancing value creation (creating new features) with value loss prevention (removing the friction caused by bugs in existing features). – Marin Dimitrov, Head of Engineering at Manual

We prioritize fixing bugs over working on other things. Most of our bugs are cleared as they come in. We found this is more productive than having ‘bug fixing weeks’ – Gus Fune, CTO at Div Brands

This approach seems harder to do at growing or large companies, where some bugs need several teams to fix them, or it’s unclear who owns a bug.

Bug expiration dates

A clever approach is to set expiration dates for when a bug should be resolved. The closer this date gets, the higher its priority. Ruben Weijers, engineering manager at TomTom elaborates:

“All triaged bugs have an end-date and an owner. If a bug is past its end-date (meaning it ‘breaches’ this date), it becomes a release blocker, regardless of whether it's a low priority bug.”

Weekly ‘bug pickups’

Ryan Hanni, engineering director at Ontra:

“We have used a weekly bug pickup process. The way it worked was simple: pick up one bug per team, per week, and fix it! This helped our bug backlog stay reasonably sized. We would always pick a high priority bug until there were none left, then do this with Medium and Low priority ones.”

Time budgets

A common approach is to fix a percentage of devs’ time to be used for bug fixing on a sprint basis, weekly or monthly.

“At various companies we’ve used quotas, which refers to the minimum percentage of time invested in bug fixing and quality improvements for each sprint. SLO-like targets on the resolution time for a bug, based on its severity (critical / high / medium / low), may be a good ‘forcing function’ to help teams balance better building new features vs bugfixing and quality improvements: when the SLO targets are regularly exceeded, this may be a signal that the team needs to increase the time (quota) allocated to bugfixing until the balance can be restored again.” – Marin Dimitrov, Head of Engineering at Manual.

“We first add bugs onto our sprint, allocating around 10-15% of our velocity. We prioritize bugs reported from our Live/Production environment. This approach means that we balance delivering new features with fixing existing issues.” – Jayesh Varma, lead Android engineer at Barclays

Ignatius Nothnagel, director of platform engineering at LocalStack uses this approach, but advises against sprinting:

“I've seen two approaches actually work in the wild:

1. Dedicate a fixed, non-negotiable percentage of capacity during every sprint to bugs and improvements.

2. Not ‘sprinting.’ Drop the concept of sprints. In my experience, this works amazingly! It turns out that hiring responsible adults and holding them accountable for making the right trade-off decisions actually works.”

Bug sprints and bug days

Interestingly enough, the approach of ‘batching’ bug fixing into a few days or a week can be hit-and-miss: either it works well enough to be a regular thing, or teams drop it because the outcome disappoints.

Accounts of when it’s a hit:

“We do a quarterly ‘just do it day’ where all engineers get to work on whatever they want for a day. This usually ends up being quality of life (QOL) improvements, dev tooling, and refactoring/cleanup work. It’s everyone’s favorite holiday!” – Maya Ziv, senior software engineer at Pavilion

“Regular bug bashes and FixIt weeks have worked very well for teams I’ve worked at Uber, Hopin, Craft, and now Manual” – Marin Dimitrov, Head of Engineering at Manual

…and when it’s a miss:

“Bug fixing, keeping the lights on (KTLO), and other emergent work outside of regular product strategy increments happens on Fridays. It doesn’t work because a lot of this work won’t fit in a single Friday, and leads to lots of context switching, dead end effort, and wasted time.” – a software engineer at a small health tech company

“We avoid ‘fix it weeks’ in favor of continuous, weekly bug pickups. If our backlog gets too big, we meet with cross-functional stakeholders (PM, UX, Dev, QE) to divide up the bugs across teams and have them fixed within the next two weeks or so, working the bugs into their cycle as they see fit.” – Ryan Hanni, director of engineering at Ontra

Another criticism of regular bug sprints is that they incentivize engineers to not worry about bugs day to day because they know there’s a regular event for dealing with them. This can reduce motivation to keep software tidy and bug-free at all times.

Warranty sprints

A variation of regular bug sprints are ‘warranty sprints.’ These refer to spending a week or two on addressing incoming bugs and feedback about a freshly released feature. Figma similarly prioritizes bugs for newly released features, as covered in the “Fix all bugs for recently released features” section, but are more focused.

Jason Diller, VP of Engineering at Arteria AI, shares:

“For warranty sprints, we typically don’t shift a team off a project as soon as it ships. We expect and plan for feedback and bugs to be higher volume right after a delivery, and keep the team dedicated to addressing those for a sprint or two, rather than punting all of that to a backlog to be dealt with later.”

2. Dedicated bug fixers: ‘goalies’

At mid-sized and larger companies, a common approach to staying on top of bugs is for an engineer to focus only on bug-related work. This role goes by a couple of names: “goalie” is the most common one, as in a soccer goalkeeper. Other terms are “support engineer,” “being on bug duty”, “bug duty officer”, “first line”, and even “bug trooper”.

Read more

Sunday, 05. January 2025

The Pragmatic Engineer

How AI-assisted coding will change software engineering: hard truths

A field guide that also covers why we need to rethink our expectations, and what software engineering really is. A guest post by software engineer and engineering leader Addy Osmani

Hi, this is Gergely with a bonus issue of the Pragmatic Engineer Newsletter. In every issue, we cover topics related to Big Tech and startups through the lens of software engineers and engineering leaders. To get articles like this in your inbox, every week, subscribe:

Subscribe now

Happy New Year! As we look toward the innovations that 2025 might bring, it is a sure bet that GenAI will continue to change how we do software engineering.

It’s hard to believe that just over two years ago in November of 2022 was ChatGPT’s first release. This was the point when large language models (LLMs) started to get widespread adoption. Even though LLMs are built in a surprisingly simple way, they produce impressive results in a variety of areas. Writing code turns out to be perhaps one of their strongest points. This is not all that surprising, given how:

Programming involves far simpler grammar than any human language

There is a massive amount of high-quality training data for these LLMs to use, in the form of working source code, thanks to open source software and crawling GitHub and other free-to-access code repositories (this kind of crawling and training is happening, regardless of whether it is ethical or not)

Last year, we saw that about 75% of developers use some kind of AI tool for software engineering–related work, as per our AI tooling reality check survey. And yet, it feels like we’re still early in the tooling innovation cycle, and more complex approaches like AI software engineering agents are likely to be the center of innovation in 2025.

Mainstream media has been painting an increasingly dramatic picture of the software engineering industry. In March, Business Insider wrote about how “Software engineers are getting closer to finding out if AI really can make them jobless”, and in September, Forbes asked: “Are software engineers becoming obsolete?” While such articles get wide reach, they are coming from people who are not software engineers themselves, don’t use these AI tools, and are unaware of the efficiency (and limitations!) of these new GenAI coding tools.

But what can we realistically expect from GenAI tools for shaping software engineering? GenAI will change parts of software engineering, but it is unlikely to do so in the dramatic way that some previous headlines suggest. And with two years of using these tools, and with most engineering teams using them for 12 months or more, we can shape a better opinion of them.

Addy Osmani is a software engineer and engineering leader, in a good position to observe how GenAI tools are really shaping software engineering. He’s been working at Google for 12 years and is currently the Head of Chrome Developer Experience. Google is a company at the forefront of GenAI innovation. The company authored the research paper on the Transformers architecture in 2017 that serves as the foundation for LLMs. Today, Google has built one of the most advanced foundational models with Gemini 2.0 and is one of the biggest OpenAI competitors.

Addy summarized his observations and predictions in the article The 70% problem: Hard truths about AI-assisted coding. It’s a grounded take on the strengths and weaknesses of AI tooling, one that highlights fundamental limitations of these tools, as well as the positives that are too good to not adopt as an engineer. It also offers practical advice for software engineers from junior to senior on how to make the most out of these tools. With Addy’s permission, this is an edited version of his article, re-published, with more of my thoughts added at the end. This issue covers:

How developers are actually using AI. Very different usages for “bootstrappers” versus “iterators.” Perhaps a reason why one tool is unlikely to work equally well for both groups?

The 70% problem: AI's learning curve paradox. Lesser-talked-about challenges with AI: the “two steps back paradox,” the hidden cost of “AI speed,” and the “knowledge paradox.”

What actually works: practical patterns. AI-first draft, constant conversation, and “trust but verify” patterns.

What does this mean for developers? Start small, stay modular, and trust your experience.

The rise of agentic software engineering. A shift to collaborating with AI, multi-modal capabilities, autonomous but guided approaches, and an “English-first” development environment.

The return of software as a craft? The lost art of polish to return, and the renaissance of personal software.

Additional thoughts. A good time to refresh what software engineering really is and how it has been the dream of needing no developers since the 1960s. And still, demand for experienced engineers could well increase in the future, rather than decrease.

Addy’s name might ring familiar to many of you. In August, we published an excerpt from his new book, Leading Effective Teams. Addy also writes a newsletter called Elevate: subscribe to to get Addy’s posts in your inbox.

With this, it’s over to Addy:

After spending the last few years embedded in AI-assisted development, I've noticed a fascinating pattern. While engineers report being dramatically more productive with AI, the actual software we use daily doesn’t seem like it’s getting noticeably better. What's going on here?

I think I know why, and the answer reveals some fundamental truths about software development that we need to reckon with. Let me share what I've learned.

I've observed two distinct patterns in how teams are leveraging AI for development. Let's call them the "bootstrappers" and the "iterators." Both are helping engineers (and even non-technical users) reduce the gap from idea to execution (or MVP).

1. How developers are actually using AI The Bootstrappers: Zero to MVP

Tools like Bolt, v0, and screenshot-to-code AI are revolutionizing how we bootstrap new projects. These teams typically:

Start with a design or rough concept

Use AI to generate a complete initial codebase

Get a working prototype in hours or days instead of weeks

Focus on rapid validation and iteration

The results can be impressive. I recently watched a solo developer use Bolt to turn a Figma design into a working web app in next to no time. It wasn't production-ready, but it was good enough to get very initial user feedback.

The Iterators: daily development

The second camp uses tools like Cursor, Cline, Copilot, and WindSurf for their daily development workflow. This is less flashy but potentially more transformative. These developers are:

Using AI for code completion and suggestions

Leveraging AI for complex refactoring tasks

Generating tests and documentation

Using AI as a "pair programmer" for problem-solving

But here's the catch: while both approaches can dramatically accelerate development, they come with hidden costs that aren't immediately obvious.

2. The 70% problem: AI's learning curve paradox

A tweet that recently caught my eye perfectly captures what I've been observing in the field: Non-engineers using AI for coding find themselves hitting a frustrating wall. They can get 70% of the way there surprisingly quickly, but that final 30% becomes an exercise in diminishing returns.

Source: Peter Yang on X

This "70% problem" reveals something crucial about the current state of AI-assisted development. The initial progress feels magical: you can describe what you want, and AI tools like v0 or Bolt will generate a working prototype that looks impressive. But then reality sets in.

The two steps back pattern

What typically happens next follows a predictable pattern:

You try to fix a small bug

The AI suggests a change that seems reasonable

This fix breaks something else

You ask AI to fix the new issue

This creates two more problems

Rinse and repeat

This cycle is particularly painful for non-engineers because they lack the mental models to understand what's actually going wrong. When an experienced developer encounters a bug, they can reason about potential causes and solutions based on years of pattern recognition. Without this background, you're essentially playing whack-a-mole with code you don't fully understand.

The hidden cost of "AI Speed"

When you watch a senior engineer work with AI tools like Cursor or Copilot, it looks like magic. They can scaffold entire features in minutes, complete with tests and documentation. But watch carefully, and you'll notice something crucial: They're not just accepting what the AI suggests. They're constantly:

Refactoring the generated code into smaller, focused modules

Adding edge case handling the AI missed

Strengthening type definitions and interfaces

Questioning architectural decisions

Adding comprehensive error handling

In other words, they're applying years of hard-won engineering wisdom to shape and constrain the AI's output. The AI is accelerating implementation, but their expertise is what keeps the code maintainable.

Junior engineers often miss these crucial steps. They accept the AI's output more readily, leading to what I call "house of cards code" – it looks complete but collapses under real-world pressure.

A knowledge gap

The most successful non-engineers I've seen using AI coding tools take a hybrid approach:

Use AI for rapid prototyping

Take time to understand how the generated code works

Learn basic programming concepts alongside AI usage

Build up a foundation of knowledge gradually

Use AI as a learning tool, not just a code generator

But this requires patience and dedication, which is exactly the opposite of what many people hope to achieve by using AI tools in the first place.

The knowledge paradox

Here's the most counterintuitive thing I've discovered: AI tools help experienced developers more than beginners. This seems backward. Shouldn't AI democratize coding?

The reality is that AI is like having a very eager junior developer on your team. They can write code quickly, but they need constant supervision and correction. The more you know, the better you can guide them.

This creates what I call the "knowledge paradox":

Seniors use AI to accelerate what they already know how to do

Juniors try to use AI to learn what to do

The results differ dramatically

I've watched senior engineers use AI to:

Rapidly prototype ideas they already understand

Generate basic implementations they can then refine

Explore alternative approaches to known problems

Automate routine coding tasks

Meanwhile, juniors often:

Accept incorrect or outdated solutions

Miss critical security and performance considerations

Struggle to debug AI-generated code

Build fragile systems they don't fully understand

There's a deeper issue here: The very thing that makes AI coding tools accessible to non-engineers, their ability to handle complexity on your behalf, can actually impede learning. When code just "appears" without you understanding the underlying principles:

You don't develop debugging skills

You miss learning fundamental patterns

You can't reason about architectural decisions

You struggle to maintain and evolve the code

This creates a dependency where you need to keep going back to AI to fix issues, rather than developing the expertise to handle them yourself.

Implications for the future

This "70% problem" suggests that current AI coding tools are best viewed as:

Prototyping accelerators for experienced developers

Learning aids for those committed to understanding development

MVP generators for validating ideas quickly

But they're not yet the coding democratization solution many hoped for. The final 30%, the part that makes software production-ready, maintainable, and robust, still requires real engineering knowledge.

The good news? This gap will likely narrow as tools improve. But for now, the most pragmatic approach is to use AI to accelerate learning, not replace it entirely.

3. What actually works: practical patterns

After observing dozens of teams, here's what I've seen work consistently:

"AI first draft" pattern

Let AI generate a basic implementation

Manually review and refactor for modularity

Add comprehensive error handling

Write thorough tests

Document key decisions

"Constant conversation" pattern

Start new AI chats for each distinct task

Keep context focused and minimal

Review and commit changes frequently

Maintain tight feedback loops

"Trust but verify" pattern

Use AI for initial code generation

Manually review all critical paths

Conduct automated testing of edge cases

Implement regular security audits

4. What does this mean for developers?

Despite these challenges, I'm optimistic about AI's role in software development. The key is understanding what it's really good for:

Accelerating the known. AI excels at helping us implement patterns we already understand. It's like having an infinitely patient pair programmer who can type really fast.

Exploring the possible. AI is great for quickly prototyping ideas and exploring different approaches. It's like having a sandbox where we can rapidly test concepts.

Automating the routine. AI dramatically reduces the time spent on boilerplate and routine coding tasks, letting us focus on the interesting problems.

If you're just starting with AI-assisted development, here's my advice:

Start small

Use AI for isolated, well-defined tasks

Review every line of generated code

Build up to larger features gradually

Stay modular

Break everything into small, focused files

Maintain clear interfaces between components

Document your module boundaries

Trust your experience

Use AI to accelerate, not replace, your judgment

Question generated code that feels wrong

Maintain your engineering standards

5. The rise of agentic software engineering

The landscape of AI-assisted development is shifting dramatically as we head into 2025. While the current tools have already changed how we prototype and iterate, I believe we're on the cusp of an even more significant transformation: the rise of agentic software engineering.

What do I mean by "agentic"? Instead of just responding to prompts, these systems can plan, execute, and iterate on solutions with increasing autonomy.

If you’re interested in learning more about agents, including my take on Cursor/Cline/v0/Bolt, you may be interested in my recent JSNation talk above.

We're already seeing early signs of this evolution:

From responders to collaborators

Current tools mostly wait for our commands. But look at newer features like Anthropic's computer use in Claude, or Cline's ability to automatically launch browsers and run tests. These aren't just glorified autocomplete. They're actually understanding tasks and taking the initiative to solve problems.

Think about debugging: Instead of just suggesting fixes, these agents can:

Proactively identify potential issues

Launch and run test suites

Inspect UI elements and capture screenshots

Propose and implement fixes

Validate the solutions work (this could be a big deal)

The Multimodal future

The next generation of tools may do more than just work with code. They could seamlessly integrate:

Visual understanding (UI screenshots, mockups, diagrams)

Verbal language conversations

Environment interaction (browsers, terminals, APIs)

This multimodal capability means they can understand and work with software the way humans do: holistically, not just at the code level.

Autonomous but guided

The key insight I've gained from working with these tools is that the future isn't about AI replacing developers. It's about AI becoming an increasingly capable collaborator that can take initiative while still respecting human guidance and expertise.

The most effective teams in 2025 may be those that learn to:

Set clear boundaries and guidelines for their AI agents

Establish strong architectural patterns that agents can work within

Create effective feedback loops between human and AI capabilities

Maintain human oversight while leveraging AI autonomy

The English-first development environment

As Andrej Karpathy noted:

"The hottest new programming language is English."

This is a fundamental shift in how we'll interact with development tools. The ability to think clearly and communicate precisely in natural language is becoming as important as traditional coding skills.

This shift toward agentic development will require us to evolve our skills:

Stronger system design and architectural thinking

Better requirement specification and communication

More focus on quality assurance and validation

Enhanced collaboration between human and AI capabilities

6. The return of software as craft?

While AI has made it easier than ever to build software quickly, we're at risk of losing something crucial: the art of creating truly polished, consumer-quality experiences.

Source: Garry Tan on X The demo-quality trap

It's becoming a pattern: Teams use AI to rapidly build impressive demos. The happy path works beautifully. Investors and social networks are wowed. But when real users start clicking around? That's when things fall apart.

I've seen this firsthand:

Error messages that make no sense to normal users

Edge cases that crash the application

Confusing UI states that never get cleaned up

Accessibility completely overlooked

Performance issues on slower devices

These aren't just P2 bugs. They're the difference between software people tolerate and software people love.

The lost art of polish

Creating truly self-serve software, the kind where users never need to contact support, requires a different mindset:

Obsessing over error messages

Testing on slow connections

Handling every edge case gracefully

Making features discoverable

Testing with real, often non-technical users

This kind of attention to detail (perhaps) can't be AI-generated. It comes from empathy, experience, and deep care about craft.

The renaissance of personal software

I believe we're going to see a renaissance of personal software development. As the market gets flooded with AI-generated MVPs, the products that will stand out are those built by developers who:

Take pride in their craft

Care about the little details

Focus on the full user experience

Build for the edge cases

Create truly self-serve experiences

The irony? AI tools might actually enable this renaissance. By handling the routine coding tasks, they free up developers to focus on what matters most: creating software that truly serves and delights users.

The bottom line

AI isn't making our software dramatically better because software quality was (perhaps) never primarily limited by coding speed. The hard parts of software development — understanding requirements, designing maintainable systems, handling edge cases, ensuring security and performance — still require human judgment.

What AI does do is let us iterate and experiment faster, potentially leading to better solutions through more rapid exploration. But this will only happen if we maintain our engineering discipline and use AI as a tool, not as a replacement for good software practices. Remember: The goal isn't to write more code faster. It's to build better software. Used wisely, AI can help us do that. But it's still up to us to know what "better" means and how to get it.

Additional thoughts

Gergely again. Thank you, Addy, for this pragmatic summary on how to rethink our expectations on AI and software engineering. If you enjoyed this piece from Addy, check out his other articles and his latest book: Leading Effective Engineering Teams.

Here are my additional thoughts on AI and software engineering.

A good time to refresh what software engineering really is

Much of the disclosure on AI tooling for software engineering focuses on code generation capabilities, and rightfully so. AI tools are impressive in generating working code from prompts, or suggesting inline code as you build software. But how much of the process of building software is coding itself? About 50 years ago, Fred Brooks thought that it is around 15-20% of all time spent. Here are Brooks’ thoughts from The Mythical Man-Month, written in 1975:

“For some years, I have been successfully using the following rule of thumb for scheduling a software task:

⅓ planning

⅙ coding

¼ component test and early system test

¼ system test, all components in hand.”

My take is that today, software engineers probably spend their time like this:

20% planning

40% coding (code + tests)

20% code review (others' code)

20% production readiness + rollout + small fixes during this + monitoring+alerting

At the same time, building standout software has a lot of other parts:

What: Figure out what to build. This can involve brainstorming, designing, user testing, working with product managers and business stakeholders, and so on. For startups, this phase can take very little time (“just build it and see if it works!”). For established companies, it can take up more time than building, though (“we need to make sure what we build doesn’t confuse our existing customers!”).

How: Draw up a plan on how to build the product/feature/service. Think through architecture implications, dependencies, how to test the product, and so on. Again, startups might be able to skip this stage, and the team can jump straight to planning. But for larger companies with more services and dependencies, leaving out planning will come back to bite the team. So most teams are doing some kind of planning using Design docs, RFCs, or ADRs.

Build: Implement the feature or product: write the code, and make sure it works.

Verify: Double check that it works as expected before shipping to production. This is especially important in cases where shipping is high-stakes: for example, shipping a regression to a banking app could have financial implications for customers, and the business! We went into details about QA in QA across the tech industry.

Ship it: Merge the change, and ship to customers. There are plenty of strategies to ship changes to production. We covered several of these in Shipping to production.

Monitoring and oncall: Detect when something is wrong with the product. If there’s an outage, resolve it as soon as possible, and then make sure a similar outage won’t happen again. We looked at these common approaches in Healthy oncall practices and in Incident review and postmortem best practices.

Maintain: Listen to customer complaints and feedback, and decide which bugs warrant fixing, and which are feature requests to prioritize. And figure out what feedback to disregard.

Migrate: If the product goes under large changes, or if the tech stack sees major changes — like a new framework — there might need to be migrations. We covered more in Migrations done well.

AI tools today can help a lot with the “Build” part. But here is a good question: Just how useful are they for the other 7 things that are also part of software engineering?

Needing no developers: the dream since the 1960s

Non-technical people creating working software without needing to rely on software developers has been the dream since the 1960s. Coding is about translating from what people want (the customers, business stakeholders, the product manager, and so on) to what the computer understands. LLMs offer us a higher level of abstraction where we can turn English into code. However, this new abstraction does not change the nature of how software is created, – and what software is, – which is this:

How software is created (and what software is —– it’s more than just code!)

GenAI tools don’t change the process, but they do make some of the coding parts more efficient:

How GenAI tools change our work as software engineers

Throughout the history of technology, new innovations promised the ability for business folks to collapse or bypass the “tech” part, and get straight to working software from their high-level prompts. This was the aspiration of:

1960s: the high-level programming language COBOL. COBOL stands for “common, business-oriented language.” The stated goal of this language was to allow business people with no programming background to use it.

1990s: Visual Basic. A programming language meant to have a very low learning curve, plus a visual environment where forms can be created with drag-and-drop.

Late 2010s: The no-code movement. Through templates and visual editing, no-code solutions like Bubble offer a way to build software applications.

Unsurprisingly, several GenAI coding startups aspire for the same goal: to allow anyone to create software, by using the English language. In the past, we have seen success for simpler use cases. For example, these days, there is no coding knowledge needed to create a website: non-technical people can use visual editors and services like Wix.com, Webflow, Ghost or WordPress.

The higher-level the abstraction, the harder it is to specify how exactly the software should work. No-code solutions already ran into this exact limitation. As advisory CTO Alex Hudson writes in his article The no-code delusion:

“The development of these syntaxes has generally run into the problem of expression: once they are simple enough to pick up quickly, they are no longer expressive enough to use in many scenarios. And vice-versa: some languages have the ability to define a custom language within them, called domain-specific languages (DSLs).

Few of these languages have ever been truly successful amongst the development community at large, primarily because they again make things extremely complex.”

For more complex software, it’s hard to see not needing software engineers taking part in planning, building and maintaining software. And the more GenAI lowers the barrier for non-technical people to create software, the more software there will be to maintain.

AI agents: a major promise, but also a big “unknown” for 2025

Two years after the launch of LLMs, many of us have gotten a pretty good handle on how to use them to augment our coding and software engineering work. They are great for prototyping, switching to less-familiar languages, and tasks where you can verify their correctness, and call out hallucinations or incorrect output.

AI agents, on the other hand, are in their infancy. Most of us have not used them extensively. There is only one generally available agent, Devin, at $500/month, and early responses are mixed.

A lot of venture funding will be pouring into this area. We’ll see more AI coding agent tools launch, and the price point will also surely drop as a result. GitHub Copilot is likely to make something like Copilot Workspace (an agentic approach) generally available in 2025. And we’ll probably see products from startups like what Stripe’s former CTO, David Singleton founded (/dev/agents.)

AI agents trade off latency and cost (much longer time spent computing results and running prompts several times, paraphrased by these startups as “thinking”) for accuracy (better results, based on the prompts). There are some good questions about how much accuracy will improve with this latency+cost tradeoff, and what engineering use cases will see significant productivity boost as a result.

Demand for experienced software engineers could increase

Experienced software engineers could be in more demand in the future than they are today. The common theme we’re seeing with AI tooling is how senior-and-above engineers can use these tools more efficiently, as they can “aim” better with them. When you know what “great output” looks like, you can prompt better, stop code generation when it’s getting things wrong, and you can know when to stop prompting and go straight to the source code to fix the code itself.

We will see a lot more code produced with the help of these AI tools, and a lot more people and businesses start building their own solutions. As these solutions hit a level of complexity, it’s a safe bet that many of them will need to bring in professionals as they attempt to tame the complexity: complexity that requires experienced engineers to deal with. Existing tech companies will almost certainly produce more code with AI tools: and they will rely on experienced engineers to deal with the increase of complexity that necessarily follows.

As a software engineer, mastering AI-assisted development will make you more productive, and also more valuable. It’s an exciting time to be working in this field: we’re living through a time of accelerated tooling innovation. It does take time to figure out how to “tame” the current tools in a way that makes you the most productive: so experiment with them!

I hope you’ve found the practical approaches from Addy helpful. For additional pointers, see the issue AI Tooling for Software Engineers in 2024: Reality Check.

Saturday, 04. January 2025

Michael Ruminer

Using LlamaIndex Part 1 — OpenAI

Using LlamaIndex Part 1 — OpenAI I have started to experiment with LlamaIndex for use in Retrieval Augmented Generation (RAG) document parsing and indexing. My results were mixed on the simple page provided. This is part 1, where I make a short post on LlamaIndex with OpenAI as the LLM component. I expect part 2 to be LlamaIndex with Ollama and Llama3–8b as the LLM components. This is a very sho
Using LlamaIndex Part 1 — OpenAI

I have started to experiment with LlamaIndex for use in Retrieval Augmented Generation (RAG) document parsing and indexing. My results were mixed on the simple page provided. This is part 1, where I make a short post on LlamaIndex with OpenAI as the LLM component. I expect part 2 to be LlamaIndex with Ollama and Llama3–8b as the LLM components.

This is a very short chunk of code. I also used the LlamaIndex Parse browser-based tool to see if I received different outputs. As one would expect, I did not. You can access the browser-based tool by opening a LlamaIndex account and choosing the “Parse” tool in your dashboard. You’ll need an account if you plan to use the code I provide and you will also need to generate an API key from your LlamaIndex dashboard. One of the great things about LlamaIndex is that for a paid tool it is generous in its free usage; 1000 credits PER DAY. In “accurate” mode, it is 1 credit per page; in “premium” mode, it is 15 credits per page. For my simple one page example the output between the two did not differ.

First the small snippet of code.

# pip install llama-index-embeddings-openai llama-index-llms-openai
# pip install llama-index-core llama-parse llama-index-readers-file

from llama_parse import LlamaParse
from llama_index.core import VectorStoreIndex
from dotenv import load_dotenv


load_dotenv()

parser = LlamaParse(result_type="markdown", verbose=True)

file_name = "ssi-page-5.pdf"
extra_info = {"file_name": file_name}

with open(f"../../sample_docs/{file_name}", "rb") as file_to_parse:
# must provide extra_info with file_name key when passing file object
documents = parser.load_data(file_to_parse, extra_info=extra_info)
# to manually check the MD output uncomment the below
# print(documents[0].text)

# index the parsed documents
index = VectorStoreIndex.from_documents(documents)

# generate a query engine for the index
query_engine = index.as_query_engine()

# provide the query and output the results
query = "what are the principles of SSI?"
response = query_engine.query(query)
print(response)

You can find this code and a few sample documents, including the document used in this code in my LlamaIndex_Test Github repo with the code specifically under the Test0 folder.

Note that I don’t set an LLM or an embedding model. LlamaIndex uses OpenAI as the default LLM and OpenAI’s text-embedding-ada-002. You will need an OpenAI API key to go along with the LlamaIndex key. My code loads them from the .env to environmental variables and if they are named appropriately those variables will be found by default. Below is a .env example.

OPENAI_API_KEY=YOUR_API_KEY
LLAMA_CLOUD_API_KEY=YOUR_API_KEY

In the code above I am using a single-page PDF, “ssi-page-5.pdf”. It is page 5 of the larger document, “Self-Sovereign Identity A Systematic Review Mapping and Taxonomy.pdf”. If you plan to send LlamaParse a larger document but use the API properties to tell it only to parse a subset of pages from the document keep in mind that LlamaParse starts at page 0. The first time I tried this I had an off-by-one issue because I assumed page 1 of the document was, you know, page 1. It was page 0. This is understandable from a programming standpoint but caught me off guard anyway.

In the example code, I opened a file directly but LlamaIndex provides a directory reader with filters, if you desire to use that instead. The results I got back on the LLM query were spot on as would be expected on a single page of context with a well-outlined section pertinent to my simple query.

You don’t really need the creation of the vector index, query engine and query/response to test out LlamaIndex parsing. Just uncomment line 23 in the above code (line 19 in the repo code) comment out everything below it and get the parsed output.

Premium Mode and Auto Mode and Less than Expected Outcomes

In the code, I didn’t try out premium mode or auto mode. I intend to make a separate post about auto mode. I did try them in the LlamaIndex Parse tool. In both, I expected the image at the top of the page to get output as an image in the “Images” tab of the Parse output tool, but it didn’t.

The image at the top of the page is below as a screen capture.

This was disappointing. I’m not sure why this did not provide the expected outcome.

There you have it. A simple bit of code to parse using LlamaIndex. What makes it different from other parsers I have tried (all open source) is that it spits out the results in markdown, if desired, which is better than the usual plain text I received in other tools. The markdown provides the LLM more context even if in my simple case it was not of value. The other is that in theory, it will better parse images, tables etc., but as I explained I did not get that result. :-( I’ll continue to experiment with it, especially on more complicated pages such as ones that contain a table and in auto mode via code.

You can find part 2 as “AI RAG with LlamaIndex, Local Embedding, and Ollama Llama 3.1 8b”. The example in part 2 uses LlamaParse auto mode.

Friday, 03. January 2025

Mike Jones: self-issued

Proposed Second Candidate Recommendation for Securing Verifiable Credentials using JOSE and COSE

The W3C Verifiable Credentials Working Group published the Snapshot Second Candidate Recommendation of the Securing Verifiable Credentials using JOSE and COSE specification just before the holidays. This was one of five Candidate Recommendation Snapshots published by the working group at the same time, including for the Verifiable Credentials Data Model 2.0, which I’m also an […]

The W3C Verifiable Credentials Working Group published the Snapshot Second Candidate Recommendation of the Securing Verifiable Credentials using JOSE and COSE specification just before the holidays. This was one of five Candidate Recommendation Snapshots published by the working group at the same time, including for the Verifiable Credentials Data Model 2.0, which I’m also an editor of. A W3C Candidate Recommendation Snapshot is intended to become a W3C Candidate Recommendation after required review and approval steps.

As I wrote about the First Candidate Recommendation, VC-JOSE-COSE secures VC Data Model payloads with JOSE, SD-JWT, or COSE signatures. And while I’m admittedly not a fan of JSON-LD, to the extent that Verifiable Credentials using the JSON-LD-based VC Data Model are in use, I’m committed to there being a solid VC-JOSE-COSE specification so there is a simple, secure, standards-based way to sign these credentials.

One significant change since the First Candidate Recommendation was splitting the Controller Document text out into its own specification called Controlled Identifier Document 1.0. Publishing a Candidate Recommendation Snapshot for it is planned for next week. Part of why it became its own specification is so that it can be referenced by the planned update to the W3C DID specification.

Thanks to my co-editor Gabe Cohen and working group chair Brent Zundel for the significant work they both put in to help us reach this point!

Wednesday, 01. January 2025

Just a Theory

Should URI::mysql Switch to DBD::MariaDB?

Should Sqitch and URI::mysql use DBD::MariaDB instead of DBD::mysql? If so, what are the implications for Sqitch deployment and usage?

I seek the wisdom of the Perl Monks:

The Sqitch project got a request to switch from DBD::mysql to DBD::MariaDB. DBD::mysql 5’s requirement to build from the MySQL 8 client library provides the impetus for the request, but in poking around, I found a blogs.perl.org post highlighting some Unicode fixes in DBD::MariaDB, as well.

Now, Sqitch likely doesn’t have the Unicode issue (it always works with Perl Unicode strings), but it depends on URI::db to provide the DBI connection string. For MySQL URIs, the URI::mysql dbi_driver method returns mysql.

Should it be changed to return MariaDB, instead? Is there general community consensus that DBD::MariaDB provides better compatibility with both MySQL and MariaDB these days?

I’m also curious what the impact of this change would be for Sqitch. Presumably, if DBD::MariaDB can build against either the MariaDB or MySQL client library, it is the more flexible choice to continue supporting both databases going forward.

Feedback appreciated via PerlMonks or the Sqitch issue.

Update 2025-01-08

URI-db 0.23 uses DBD::MariaDB instead of DBD::mysql for both URI::mysql and URI::MariaDB.

Similarly, Sqitch v1.5.0 always uses DBD::MariaDB when connecting to MySQL or MariaDB, even when using older versions of URI::db. Thanks everyone for the feedback and suggestions!

More about… Perl Sqitch URI::db MySQL MariaDB

New JSONPath Feature: SelectLocated

New in the jsonpath Go package and Playground: “Located” results that pair selected values with normalized paths to their locations.

Happy New Year! 🎉🥳🍾🥂

The JSONPath RFC includes a section on defining normalized paths, which use a subset of JSONPath syntax to define paths to the location of a node in a JSON value. I hadn’t thought much about it, but noticed that the serde JSONPath Sandbox provides a “Located” switch adds them to query results. For the sake of complementarity, I added the same feature to the Go JSONPath Playground.

🛝 See it in action with this example, where instead of the default output:

[ 8.95, 12.99, 8.99, 22.99, 399 ]

The located result is:

[ { "node": 8.95, "path": "$['store']['book'][0]['price']" }, { "node": 12.99, "path": "$['store']['book'][1]['price']" }, { "node": 8.99, "path": "$['store']['book'][2]['price']" }, { "node": 22.99, "path": "$['store']['book'][3]['price']" }, { "node": 399, "path": "$['store']['bicycle']['price']" } ]

v0.3.0 of the github.com/theory/jsonpath Go package enables this feature via its new SelectLocated method, which returns a LocatedNodeList that shows off a few of the benfits of pairing JSONPath query results with paths that uniquely identify their locations in a JSON value, including sorting and deduplication. It also takes advantage of Go v1.23 iterators, providing methods to range over all the results, just the node values, and just the paths. As a result, v0.3.0 now requires Go 1.23.

The serde_json_path Rust crate inspired the use of LocatedNodeList rather than a simple slice of LocatedNode structs, but I truly embraced it once I noticed the the focus on “nodelists” in the RFC’s overview, which provides this definition:

A JSONPath expression is a string that, when applied to a JSON value (the query argument), selects zero or more nodes of the argument and outputs these nodes as a nodelist.

It regularly refers to nodelists thereafter, and it seemed useful to have an object to which more features can be added in the future. github.com/theory/jsonpath v0.3.0 thererfore also changes the result value of Select from []any to the new NodeList struct, an alias for []any. For now it adds a single method, All, which again relies on Go v1.23 iterators to iterate over selected nodes.

While the data type has changed, usage otherwise has not. One can iterate directly over values just as before:

for _, val := range path.Select(jsonInput) { fmt.Printf("%v\n", val) }

But All removes the need to alias-away the index value with _:

for val := range path.Select(jsonInput).All() { fmt.Printf("%v\n", val) }

I don’t expect any further incompatible changes to the main jsonpath module, but adding these return values now allows new features to be added to the selected node lists in the future.

May you find it useful!

More about… Go JSONPath Playground RFC 9535

Wrench in the Gears

Wishing All A Resonant New Year – May We Have The Blessings Of New Learnings And Chances To Grow In 2025

We don’t always get to choose what happens during the course of our lives, but we DO get to choose how we incorporate the unexpected into our stories. Here’s to seeing the value of complementary energies that keep this “reality” going even during times when the mixture makes us queasy. May we learn to navigate [...]

We don’t always get to choose what happens during the course of our lives, but we DO get to choose how we incorporate the unexpected into our stories. Here’s to seeing the value of complementary energies that keep this “reality” going even during times when the mixture makes us queasy. May we learn to navigate complex landscapes layered with meaning by remembering to be still, open, without knee jerk judgement. Quantum superposition is full of potential, if only we can learn how to engage with it. When we get stuck, try to remember there are other angles, different scales, alternative time structures. I believe the divine cosmos of which we are an integral part is beneficent, responsive, and playful. In an age of apocalyptic anxiety, may we stay in touch with our inner children who can create many somethings from an apparent “nothing.” Tap the inside of the doughnut, torus fields pulsing with heart energy for all beings, keeping collective time for this beautiful Earth that holds our bodies and souls for now.

New Year’s Greetings from Hot Springs, Arkansas!

PS: Joseph has a different operating system than I do, but it seems we keep arriving in roughly the same place. Be sure to check out his posts on the algorithmic “circle of values” and ideas about quantum realism, information theory, and death.

PPS: I highly recommend the Adrian Tchaikovsky “Children of Time” trilogy. This is a link to a PDF I made this morning of relevant sections pertaining to crystalline communication with the perceived “divine,” Lamarckian epigenetics, complex system evolution, heresy, ant computers, and encrypted chemical engineering.

A half-hour update and end-of-2024 thoughts below.

 


IdM Laboratory

Intention Economyその後

こんにちは、富士榮です。 年末にDoc SearlsがIntention Economyについて「The Real Intention Economy」というポストをしています。かなり重要なポストだと思うので読んでおいた方が良さそうです。 https://doc.searls.com/2024/12/30/the-real-intention-economy/ 彼の著書は日本語にも翻訳されていますね。 https://amzn.to/3C2PX9n さて、今回のDocのポストに戻ると、彼がIntention Economyの考え方を発表してからもう直ぐ20年が経とうとしている現在、生成AIの文脈も相まって、Intention Economy自体が脅威となりつつある、という話です。 Intention Economyで検索すると結構ヤバ目の結果が返
こんにちは、富士榮です。
年末にDoc SearlsがIntention Economyについて「The Real Intention Economy」というポストをしています。かなり重要なポストだと思うので読んでおいた方が良さそうです。
https://doc.searls.com/2024/12/30/the-real-intention-economy/
彼の著書は日本語にも翻訳されていますね。 https://amzn.to/3C2PX9n

さて、今回のDocのポストに戻ると、彼がIntention Economyの考え方を発表してからもう直ぐ20年が経とうとしている現在、生成AIの文脈も相まって、Intention Economy自体が脅威となりつつある、という話です。
Intention Economyで検索すると結構ヤバ目の結果が返ってくるようになっているとのこと。 要するにIntention Economyというキーワードが悪用されつつある、ということですね。
こんなことも書かれていると言っています。
The near future could see AI assistants that forecast and influence our decision-making at an early stage, and sell these developing “intentions” in real-time to companies that can meet the need – even before we have made up our minds.

近い将来、AI アシスタントが早い段階で私たちの意思決定を予測して影響を与え、私たちが決断を下す前であっても、その発展中の「意図」をニーズを満たすことができる企業にリアルタイムで販売するようになるかもしれません。

同じくこんな引用もされています。
The rapid proliferation of large language models (LLMs) invites the possibility of a new marketplace for behavioral and psychological data that signals intent.

大規模言語モデル (LLM) の急速な普及により、意図を示す行動および心理データの新しい市場が生まれる可能性が生まれています。


もともと顧客の関心(Attention)を商品として販売するというモデルに対するアンチテーゼの文脈としての意図(Intention)を中心とした経済としてIntention Economyだったはずですが、その意図自体を商品として販売する、という市場が形成されてきつつあるということですね。

人間の欲望は果てしないわけですが、私たちは思想の源流をきちんと見据え、意図を理解した上で社会実装を進めたいものです。 

 


Tuesday, 31. December 2024

Just a Theory

SQL/JSON Path Playground Update

The Go SQL/JSON Playground has been updated with a fresh design and PostgreSQL 17 compatibility.

Based on the recently-released Go JSONPath and JSONTree playgrounds, I’ve updated the design and of the SQL/JSON Playground. It now comes populated with sample JSON borrowed from RFC 9535, as well as a selection of queries that randomly populate the query field on each reload. I believe this makes the playground nicer to start using, not to mention more pleasing to the eye.

The playground has also been updated to use the recently-released sqljson/path v0.2 package, which replicates a few changes included in the PostgreSQL 17 release. Notably, the .string() function no longer uses a time zone or variable format to for dates and times.

Curious to see it in action? Check it out!

More about… Postgres SQL/JSON JSON Path Go Playground

Werdmüller on Medium

Tintin and the fascists

The boy reporter has a fascist origin. But something new is possible. Continue reading on Medium »

The boy reporter has a fascist origin. But something new is possible.

Continue reading on Medium »


Predictions for tech, 2025

It’s going to be a hard year. Continue reading on Medium »

It’s going to be a hard year.

Continue reading on Medium »

Monday, 30. December 2024

IdM Laboratory

366/366 !!!

こんにちは、富士榮です。 ついにこの日が来ました。 去年の正月休みに某猫とのチキンレースが始まってしまったので収まりがつかなくなって惰性で描き続けていましたが気がついたら本当に1年経ってしまいました。 ↓某猫のポスト ふじえさん、やっぱりやっとるな! 毎日記事を書く366チャレンジや! これ絶対やっとるぞ! — 👹秋田の猫🐱 (@ritou) January 4, 2024 最初のうちは割と実装してみよう!的なポストが多かったのですが、中盤〜後半は忙しくなりすぎたこともあり読んでみようシリーズが大半を占めてしまったのは反省です。 ということで振り返ってみましょう。 1月のポストはこんな感じです。 この頃は結構作ってますね。まぁ、冬休みが暇だったので実装し始めたのがきっかけだったので。 あとは1月はOpenID Summit Tokyo

こんにちは、富士榮です。

ついにこの日が来ました。



去年の正月休みに某猫とのチキンレースが始まってしまったので収まりがつかなくなって惰性で描き続けていましたが気がついたら本当に1年経ってしまいました。

↓某猫のポスト

ふじえさん、やっぱりやっとるな!
毎日記事を書く366チャレンジや!
これ絶対やっとるぞ!

— 👹秋田の猫🐱 (@ritou) January 4, 2024


最初のうちは割と実装してみよう!的なポストが多かったのですが、中盤〜後半は忙しくなりすぎたこともあり読んでみようシリーズが大半を占めてしまったのは反省です。

ということで振り返ってみましょう。

1月のポストはこんな感じです。


この頃は結構作ってますね。まぁ、冬休みが暇だったので実装し始めたのがきっかけだったので。

あとは1月はOpenID Summit Tokyoもありましたね。2024年の後半にかけて現在も活動が続いているSIDI Hubを日本で開催する調整も実はこの時期から始まっていました。


次に2月です。この辺りでそういえば今年は366日やん、と思って他の年よりも1日不利!!!ということに気がついた感じです。


まだ実装は続けていますね。OpenID Providerが一段落したのでパスキーに手を出し始めています。やっぱり手を動かさないとわからないことも多いなぁ、と実感した時期でもありました。


3月です。


まだ実装も続けいますが、色々とニュースも紹介し始めているのと、普段考えていることなんかもポストし始めていますね。結果、ポストを読んでくれた人たちと議論することもできたので非常に勉強になりました。


4月です。


2月ごろにデジタル庁の認証アプリについても色々と調べたり考えたりしていましたが、結果メディアの方々からもインタビューいただいたりもして、各種社会実装について深く考えた時期でもありました。個人的には新年度も重なったことで結構忙しかった記憶しかありません・・・


5月です。


4月〜6月はイベントも多かったので感想を書いていたのと、ちょうどNIST SP800-63-3の同期可能クレデンシャルに関する追補版が出た時期でしたね。

色々と読むものが多かった気がします。


6月です。


EICがあったので参加していましたね。来年もいかないと。。。

他にも色々なドキュメントが公開されたので読み込む系のポストが増えてきていますね。


7月です。

折り返し地点です。


そういえばこの時期にDIF Japanのキックオフがあったんですね。他にもDID/VCに関する論文を公開したりもしました。色々と暑い時期でした。


8月です。


パスキーに関する議論が色々とあった時期なので日本語にした公開したりしましたね。パスキー、まだまだ完全に普及した、という状態ではないので引き続き様子は見ていきたいと思います。

この時期はトラスト、とか本人確認や身元確認へのデジタルクレデンシャルの利用について割と真剣に考え始めている時期だったのでそういうニュアンスのポストもしていますね。まだまだ適当な実装が多いこの世の中なので、みんな真剣に考えていけるといいですね。


9月です。


SIDI HubワシントンDC会合もありましたし、ベルリンやケープタウンのレポートが公開された時期でもあったのでSIDI Hub三昧でした。他にもついにパンドラの箱を開けたAuthZEN WGが本格的に活動を始めた時期だったのでAuthorization APIもウォッチし始めた時期ですね。


10月です。


10月末に東京でSIDI Hub Summitを開催したので、その準備でかなり忙しかった時期です。月末〜月初はIIW〜IETFもありましたし。

国際イベントのハンドリングや準備は何度やっても良い経験になりますね。しんどいけど。


11月です。


リンク可能性の話はまだ解けていない課題の中でも議論がつきない話です。IIWでも何年も話題になっていますし、IETFのメーリングリストでも議論が何度も行われています。


12月です。ついに終わります。


台湾政府に呼ばれてWalletの話をしに行ったりもしましたし、今まさに読んでいるAAMVAのガイドラインが11月末に更新されたことを受け、読んでいきました。



ということであっという間に1年が経ってしまいました。


で、来年はどうするの?という話ですが、まぁ習慣化してしまったところなので今後も無理しない程度に書いていこうとは思いますが、適度に休む必要性も同時に感じているので毎日は描かないかなぁ、と思います。クォリティも落ちますしね。


ということでみなさん、良いお年を!






Patrick Breyer

Soll ich der elektronischen Patientenakte widersprechen und wie geht das?

Wenn du gesetzlich krankenversichert bist, wird deine Krankenkasse bis 15. Januar 2025 eine elektronische Patientenakte für dich einrichten – es sei denn, du widersprichst. Das gilt auch für private Krankenversicherungen, die …
Wenn du gesetzlich krankenversichert bist, wird deine Krankenkasse bis 15. Januar 2025 eine elektronische Patientenakte für dich einrichten – es sei denn, du widersprichst. Das gilt auch für private Krankenversicherungen, die freiwillig eine elektronische Patientenakte anbieten. Durch einen Widerspruch dürfen dir keine Nachteile entstehen. Die Anschreiben der Krankenkassen informieren unzureichend. Bedenke bei deiner Entscheidung:

1. Inhalt und Datensicherheit: Ohne deinen Widerspruch wird künftig jeder Arztbesuch, jede Therapie und jede Medikation in einer zentral abrufbaren elektronischen Patientenakte gespeichert, darunter Arztbriefe, Entlassungsberichte und Diagnosekennungen. Hierunter fallen unter anderem auch Informationen zu deinen Suchtkrankheiten, Psychotherapien und psychischen Erkrankungen, Schwangerschaftsabbrüchen, Geschlechtskrankheiten und Reproduktionsstörungen (z.B. Impotenz), die gespeichert und zusammengetragen werden. Durch die zentrale Speicherung aller Behandlungen in einer elektronischen Patientenakte erhältst du eine einheitliche Zugriffsmöglichkeit auf deine Patientendaten. Andererseits waren in der Vergangenheit bereits mehrere zentralisierte, europäischen Gesundheitssysteme von umfangreichen Datenpannen betroffen. Bei der elektronischen Patientenakte in Deutschland ist noch nichts passiert. Sicherheitsforscher warnen jedoch, Kriminelle könnten mit wenig Aufwand auf beliebige Patientenakten zugreifen. Falls es zu Hacking, Datendiebstahl oder Datenverlust kommen sollte, können viel mehr Informationen verloren gehen als ohne elektronische Patientenakte.

2. Direkter Zugriff: Mit der elektronischen Patientenakte können behandelnde Ärzte, deine Apotheker, deine Physiotherapeuten, dein Pflegeheim, usw., sowohl in Deutschland als auch künftig im EU-Ausland deine elektronische Patientenakte direkt einsehen. Sie können sie auch in ihrer eigenen Praxissoftware speichern. Die Vorteile: Der Datenzugriff kann deine Behandlungen und Medikation wesentlich beschleunigen und verbessern, z. B. auch fehlerhafte Medikamentationen vermeiden. Unterlagen müssen nicht erst angefordert werden und liegen auch im Notfall unmittelbar vor. Doppeluntersuchungen entfallen. Ein möglicher Nachteil könnte sich daraus ergeben, dass für andere medizinische Stellen nicht relevante Behandlungen, Medikamentationen, etc. abgerufen und somit eingesehen werden können (z.B. dein Zahnarzt oder Apotheker könnte von deiner Psychotherapie oder Geschlechtskrankheit erfahren).

Ohne elektronische Patientenakte wirst du, so wie du es bisher kennst und möglicherweise erlebt hast, auf einem Anamnesebogen nach Vorbehandlungen, Medikamentationen, Unverträglichkeiten, Allergien, usw. gefragt. Gegebenenfalls werden weitere Unterlagen angefordert wie z. B. MRT-Aufnahmen, usw. Es gibt auch einen papierbasierten, bundeseinheitlichen Medikationsplan, den du dir ausdrucken lassen kannst. Dieser ist aber auch in der elektronischen Patientenakte speicherbar.

Mit elektronischer Patientenakte kannst du mündlich, über eine App oder über deine Krankenkasse einzelne (ärztliche) Leistungserbringer komplett vom Zugriff auf deine elektronische Patientenakte ausschließen. Dies ist mit gewissen Herausforderungen verbunden. Du hast auch das Recht, gegenüber Leistungserbringern der Übertragung von einzelnen Informationen in die elektronische Patientenakte zu widersprechen. Du kannst einzelne Dokumente auch nachträglich wieder aus ihrer elektronischen Patientenakte löschen (lassen) – leider wieder recht kompliziert. Bedenke, dass Löschungen Nachteile für deine Behandlung nach sich ziehen können.

3. Weitergabe an Dritte: Deine elektronische Patientenakte kann für bestimmte Zwecke auch an Politik und Behörden, Forschende und Wirtschaftsunternehmen (z.B. Technologieunternehmen und Pharmaindustrie) weitergegeben werden. Die Chancen: Anonymisierte Gesundheitsdatenanalysen ermöglichen bedeutende Fortschritte in der Pandemie- und Endemieeindämmung, z. B. durch Früherkennung, sowie in der Forschung, z.B. bei der Entwicklung sicherer Medikamente. Die Risiken: Nur teilweise werden Daten vor der Weitergabe anonymisiert. In anderen Fällen werden dein Name und deine Versichertennummer zwar entfernt, aber über andere Kennzeichen bleibst du eindeutig identifizierbar (sog. Pseudonymisierung). So kann es Dritten gelingen, deine Krankheitsgeschichte wieder dir zuzuordnen.

Hinweis: Auch wenn du die elektronische Patientenakte nutzt, kannst du ihrer Weitergabe an Dritte frühestens ab dem 15.01.2025 separat widersprechen (über eine App deiner Krankenkasse oder durch Brief an ihre Ombudsstelle).

Ergebnis: Es ist letztendlich deine Entscheidung, ob du eine elektronische Patientenakte haben möchtest oder nicht.

Wenn du eine elektronische Patientenakte geführt haben möchtest, brauchst du nichts zu tun – sie wird ab 15. Januar 2025 automatisch eingerichtet.

Wenn du dich gegen eine elektronische Patientenakte entscheidest, hilft dir der Widerspruchs-Generator ein Widerspruchsschreiben zu erstellen. Du kannst auch per Krankenkassen-App oder – bei einigen Krankenkassen – auch über deren Website widersprechen.

Du kannst ab dem Moment widersprechen, in dem deine Krankenkasse dich über dein Widerspruchsrecht informiert hat. Ein Widerspruch ist auch nach Ablauf der in dem Schreiben genannten 6-Wochen-Frist jederzeit möglich; dann werden alle bereits gespeicherte Daten wieder aus der elektronischen Patientenakte gelöscht. Solltest du später einmal deine Entscheidung ändern, kannst du deinen Widerspruch jederzeit wieder zurücknehmen und für die Zukunft eine elektronische Patientenakte bekommen.

Weitere Informationen des GKV-Spitzenverbands (mit der Bundesdatenschutzbeauftragten abgestimmt)

Wie die Piraten einen Zwang zur elektronischen Patientenakte verhindert haben

Sunday, 29. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む⑧

 こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 まだまだプライバシーの章が続きます。 4.5. DELETING MDL INFORMATION FROM A DEVICE An mDL holder must have the capability to delete the mDL holder’s mDL from the mDL holder’s device. Such deletion: Must delete all mDL information, log information, and any metadata (e.g. settings) that could impart information

 こんにちは、富士榮です。

引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。


まだまだプライバシーの章が続きます。

4.5. DELETING MDL INFORMATION FROM A DEVICE

An mDL holder must have the capability to delete the mDL holder’s mDL from the mDL holder’s device. Such deletion:

Must delete all mDL information, log information, and any metadata (e.g. settings) that could impart information about the deleted mDL or its use.  Must not require approval by the Issuing Authority. Must be an option available to an mDL holder on the mDL device Must be possible when the mDL device is offline. Should be available to an mDL holder via a request to the Issuing Authority (see below).

mDL保持者は、mDL保持者のデバイスからmDL保持者のmDLを削除する機能を持たなければならない。

すべてのmDL情報、ログ情報、および削除されたmDLまたはその使用に関する情報を与える可能性のあるメタデータ(設定など)を削除すること 発行機関の承認を必要としないこと。 mDLデバイス上でmDL保持者が利用可能なオプションであること。 mDLデバイスがオフラインのときに可能であること。 発行機関(下記参照)へのリクエストにより、mDL保持者が利用可能であること。

 デバイスからmDL情報を削除する際の話です。基本的に利用者が自身で削除をすることができること(その際に発行者の承認や接続が不要であること)が求められています。難しいところですね。この章の中で発行したmDL関連情報が適切に扱われていること発行機関が責任をもって確認することが求められる一方で利用者の権利も守らないといけないわけです。まぁ、最低限ウォレット開発者が悪意を持って利用者のデータを扱えないように、というところまでは守りましょう、ってところですね。

Should an mDL device (i.e. a device containing an mDL) be lost or get stolen, it could be beneficial for the mDL holder to have the mDL remotely deleted (or temporarily suspended) by the Issuing Authority. Besides the obvious advantage to the mDL holder, other considerations apply too:

The mDL holder’s request must be authenticated. It must not be possible for someone other than the mDL holder or the Issuing Authority to delete (or suspend) an mDL. A “push” capability (from the Issuing Authority to the mDL device) is needed for immediate deletion (or suspension) (see section 6). Successful deletion (or suspension) depends on network connectivity to the mDL device The mDL will automatically become unusable (although potentially not inaccessible) when the MSO expires (see section 6). 

mDLデバイス(mDLを含むデバイス)が紛失または盗難に遭った場合、発行機関によってmDLがリモートで削除(または一時的に停止)されることは、mDL保有者にとって有益です。mDL保有者にとっての明らかな利点の他に、他の考慮事項も適用されます:

mDL保有者の要求は認証されなければならない。mDL保持者の要求は認証されなければならない。mDL保持者または発行機関以外の者がmDLを削除(または一時停止)することはできない。 即時削除(または一時停止)には、(発行局からmDLデバイスへの)「プッシュ」機能が必要である(セクション6参照) 削除(または一時停止)の成功は、mDLデバイスへのネットワーク接続に依存します。 MSOの有効期限が切れると、mDLは自動的に使用できなくなる(アクセスできなくなる可能性はないが)(セクション6参照)。

やはりスマートフォンベースの話なので当然紛失や盗難に関する考慮は十分に必要です。

mDLを利用するときはちゃんと認証するのは当たり前として、発行者から発行済みのクレデンシャルをプッシュ等を使って削除できるようにする、また有効期限切れたらウォレット側で自動的に使えなくする、などもちゃんと気を使う必要があります。

In addition, mDL deletion may be needed when an mDL holder wants to transfer an mDL to a new device, when a person moves to another jurisdiction, or when a person dies. 

Issuing Authorities should weigh the benefits and challenges associated with a remote delete (or suspension) capability when considering its implementation (see Appendix A).

An mDL holder must have the capability to delete activity log information (as defined in section 4.4) the mDL holder may previously have elected to maintain. It is recommended that this capability allows selective deletion (i.e. specific log entries, rather than only an “all or nothing” option).

さらに、mDLの削除は、mDL保持者が新しいデバイスにmDLを移したい場合、別の管轄区域に移動する場合、またはmDL保持者が死亡した場合に必要となる可能性がある。

発行局は、リモート削除(または一時停止)機能の導入を検討する際、その利点と課題を比較検討する必要がある(付録A参照)。

mDL保持者は、mDL保持者が以前に保持することを選択した活動ログ情報(第4.4項に定義)を削除する機能を持たなければならない。この機能により、選択的な削除(すなわち、「全削除」オプションのみではなく、特定のログエントリーの削除)を可能にすることが推奨される。

mDLを含めデジタルデータを持ち主だけが制御できるようにするのは大切な一方で死亡した場合などの考慮は非常に重要です。マイナンバーカードと保険証の統合をした結果、意識のない救急患者の保険者資格の確認ができない、なんて話も聞きますが、この辺りは例外処理も含めてちゃんとプロセス設計をしておくのが大切です。

また、ログの削除に関しても選択的に削除することができるようにすべきである、などかなり細かくガイドされている感じがあります。

4.6. NO TRACKING

“Tracking” is the act of compiling information about an mDL holder and/or an mDL holder’s activity. Any stakeholder (including Issuing Authorities, technology providers, service providers and mDL verifiers) must not track mDL holders or the usage of any mDL except as required by law (e.g. when a drug store dispenses products containing ephedrine). 

「トラッキング」とは、mDL保持者および/またはmDL保持者の活動に関する情報を収集する行為を指します。いかなるステークホルダー(発行局、テクノロジープロバイダー、サービスプロバイダー、mDLベリファイアーを含む)も、法律で義務付けられている場合(ドラッグストアがエフェドリンを含む製品を調剤する場合など)を除き、mDL保持者やmDLの使用状況を追跡してはなりません。

トラッキングの禁止に関する条項ですね。法的根拠なくトラッキングしてはならない、と。 

Tracking by an mDL verifier can be performed as soon as two different mDL transactions can be linked to each other. This can be countered by designing the solution to maximize anonymity (“characteristic of information that does not permit a personally identifiable information principal to be identified directly or indirectly”, from ISO/IEC 29100) and to maximize unlinkability. Anonymity can be hampered by metadata that may be associated with multiple mDL transactions, e.g. hardware or network addresses, long-term public keys, or session tokens. Consequently, Issuing Authorities must minimize the sharing of static or long-lived metadata. 

mDL検証者による追跡は、2つの異なるmDLトランザクションが互いにリンクされるとすぐに実行できる。これは、匿名性(「個人を特定できる情報主体が直接的または間接的に特定されない情報の特性」、ISO/IEC 29100より)を最大化し、リンク不能性を最大化するようにソリューションを設計することで対抗できる。匿名性は、複数のmDLトランザクションに関連するメタデータ(ハードウェアやネットワークアドレス、長期公開鍵、セッショントークンなど)によって妨げられる可能性がある。そのため、発行局は静的または長期的なメタデータの共有を最小限に抑える必要がある。

これはSD-JWT-VCでも同じ議論がなされていますが、Verifierの結託によるリンク可能性の話ですね。mdocにおける選択的開示については基本的にSD-JWTと類似の考え方なので単体ではリンク可能性に対する対応はできなかったはずです。そのため匿名性を担保するソリューションを別途検討することが必要とされています。 

Although pre-matched transactions hold the promise of maximizing anonymity at a user data level, anonymity in post-matched transactions is limited since the portrait image is always shared. For these transactions it is recommended that Issuing Authorities pursue regulatory protection against tracking by mDL verifiers.

事前照合取引は、ユーザー・データ・レベルでの匿名性を最大化することが期待できるが、事 後照合取引では肖像画像が常に共有されるため、匿名性は制限される。このような取引の場合、発行機関はmDL検証者による追跡を防ぐため、規制による保護を追求することが推奨されます。

Solutions using the server retrieval method also pose challenges in preventing tracking. As per design, the Issuing Authority is involved in real time each time an mDL is used by the mDL holder. The Issuing Authority would technically be able to keep track of when an mDL holder uses his/her mDL and keep track of what data is shared. Based on IP address analysis the Issuing Authority would also be able to track an mDL holder’s physical location to some extent. This can be mitigated by placing regulatory limitations on the Issuing Authority11, and will be of value to the extent an mDL holder trusts the Issuing Authority’s adherence to the regulatory limitations. Consequently, Issuing Authorities considering a server retrieval solution should carefully weigh the advantages of this approach against its privacy implications. 

サーバーリトリーバルを使用するソリューションは、追跡を防ぐという課題もある。設計の通り、発行局はmDL保有者がmDLを使用するたびにリアルタイムで関与します。発行局は技術的に、mDL保有者がいつmDLを使用し、どのようなデータが共有されたかを追跡することができます。IPアドレスの分析に基づき、発行局はmDL保持者の物理的な所在地をある程度追跡することもできます。この問題は、発行局に規制上の制限を設けることで緩和することができます11 。そのため、発行局はサーバー検索ソリューションを検討する際、このアプローチの利点とプライバシーへの影響を慎重に比較検討する必要があります。

サーバーリトリーバルは基本的に従来のフェデレーションモデルと同様に発行者への問い合わせが発生するため、トラッキング耐性は低いとされます。この辺りはエコシステムのサイズや参加しているエンティティの関係性などを踏まえて設計していかないといけないポイントですね。 

Since the activity log (see section 4.4) contains a full record of when and potentially where an mDL was used, it is reiterated that access to the activity log must not be possible by anyone other than the mDL holder. 

アクティビティログ(4.4項参照)には、mDLがいつ、どこで使用されたかについての完全な記録が含まれるため、mDL保持者以外の者がアクティビティログにアクセスできないようにする必要があります。

 

今日もこの辺りにしておきましょう。


Saturday, 28. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む⑦

こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 引き続き4章のプライバシーの部分を読んでいきます。 4.3. PROTECTING DATA It is up to Issuing Authorities to ensure that all mDL data stored on the mDL holder’s device is adequately protected. As standards in this respect are still under development, each Issuing Authority should take great care to ensure that the design of its

こんにちは、富士榮です。

引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。


引き続き4章のプライバシーの部分を読んでいきます。

4.3. PROTECTING DATA

It is up to Issuing Authorities to ensure that all mDL data stored on the mDL holder’s device is adequately protected. As standards in this respect are still under development, each Issuing Authority should take great care to ensure that the design of its solution supports this requirement. At minimum, Issuing Authorities must adhere to the following:

発行局は、mDL保持者のデバイスに保存されたすべてのmDLデータが適切に保護されていることを確認する必要があります。この点に関する標準はまだ開発中であるため、各発行局はソリューションの設計がこの要件を確実にサポートするよう、細心の注意を払う必要があります。発行局は、最低限以下の事項を遵守しなければなりません:

 原文でも太字で強調されているとおり、mDL App(ウォレット)に保持されているmDLデータが保護されていることを発行者が確認することが求められています。この責任分解の考え方は非常に重要ですね。欧州でもそうですが発行者となる国が認定したウォレットが必要になるのはこのような背景からきていると思います。しかしこうなるとApple WalletやGoogle Walletに格納されたクレデンシャルが適切に管理されていることをどこまで国は確認できるんだろうか、、、と気になってきますね。

具体的な要件が続きます。

mDL information must be stored in encrypted form Private key material must be protected in a security module designed for the safekeeping of key material. The mDL holder must be authenticated when any mDL data is accessed or released, at a point in time that is sufficiently close (as determined by the Issuing Authority) to the time of the access or release. Issuing Authorities that want to leverage device unlocking to protect mDL data must include measures to ensure that this feature has not been disabled by the mDL holder (also see section 7). Example: If an app authenticates the mDL holder when the mDL app is accessed, an Issuing Authority should set a time limit after which authentication of the mDL holder is again required before the release of mDL data.  mDL data must be released to an mDL verifier only via the following: an ISO/IEC 18013-5 compliant interface. an ISO/IEC 18013-7 compliant interface. As an alternative to ISO/IEC 18013-7, an over-the-Internet interface as envisioned in Appendix C that: Complies with Appendix C items 2.b and 2.f, and  Has been approved by the AAMVA Identity Management Committee. For sharing mDL data between apps on a phone via an interface other than those listed above, an interface compliant with Appendix C items 2.b and 2.f and that has been approved by the AAMVA Identity Management Committee  mDL情報は暗号化された形で保存されなければならない。 秘密鍵は、鍵の保管のために設計されたセキュリティ・モジュールで保護されなければならない。 mDL データがアクセスまたは公開される際には、アクセスまたは公開の時点に(発行局が決定する)十分 に近い時点で、mDL 所持者が認証されなければならない。デバイスのロック解除を活用してmDLデータを保護したい発行局は、この機能がmDL保持者によって無効化されていないことを保証する手段を含める必要があります(セクション7も参照)。 例 アプリがmDLアプリにアクセスしたときにmDLの所有者を認証する場合、発行局は、mDLデータの公開前にmDLの所有者の認証が再度必要となる制限時間を設定する必要があります。 mDLデータは、以下を経由してのみmDL検証者に公開されなければならない: ISO/IEC 18013-5に準拠したインターフェース。 ISO/IEC 18013-7準拠のインターフェース。 ISO/IEC 18013-7 に代わるものとして、付録 C で想定されているインターネット上のインター フェース: 付録Cの項目2.bおよび2.fに準拠し、かつ AAMVA アイデンティティ管理委員会によって承認されている。 上記以外のインタフェースを介して携帯電話のアプリ間で mDL データを共有する場合は、付 録 C 項目 2.b および 2.f に準拠し、AAMVA アイデンティティ管理委員会によって承 認されたインタフェース。

かなり細かく要件が決まってますね。EUでも鍵をどこに置くかは色々と議論がありましたが、AAMVAではセキュリティ・モジュールになってますね。クラウドベースのHSMとかは選択肢に入らないのかな?あと、Holderのプレゼンスや認証のタイミング、ウォレットのアンロックが無効化されていないことの確認など色々とガイドがありますがどうやって確認するんだ??って気もしますが。こうなってきるとやはり専用ウォレットみたいな話になってきそうですねぇ。。

Note 1: This requirement prohibits the sharing of mDL data using the mDL as a “flash pass” (i.e. by showing an image of a credential to a verifier); also see section 8.

注 1:この要件は、mDL を「フラッシュ・パス」(すなわち、検証者にクレデンシャルの画像を見せること)として使用して mDLデータを共有することを禁止している。

これも重要ですね。以前紹介したパートにも書いてありましたが基本的にmDLは目視で確認するためのものではない、ということですね。

4.4. ACTIVITY LOG

The mDL app must be capable of maintaining an activity log. The mDL app must allow the mDL holder to decide if an activity log must be maintained or not. It is recommended that the mDL app requires the mDL holder to explicitly choose for or against keeping an activity log upon setup (i.e. no defaults, and in addition to being able to change this subsequently). The activity log and related settings must be accessible only to the mDL holder (also see section 4.6). The activity log must allow for the recording of all mDL transactions. In this context, an mDL transaction is the sharing of information by an mDL holder with an mDL verifier, as well as any provisioning, update, or communication action between the mDL and the Issuing Authority. At minimum, the following must be recordable for any transaction: Transaction timestamp; type of transaction (e.g. update or data sharing); in case of a data sharing transaction the data that was shared, and to the extent that it can be gathered, information about the identity of the mDL verifier. It is recommended that the mDL app provides the mDL holder the capability to select what types of activities are recorded in the activity log (i.e. rather than only an “all or nothing” option). It is also recommended that the mDL app includes functionality to help the mDL holder monitor and manage the size of the activity log within the capabilities of the mDL holder’s device. The mDL app must provide an option to the mDL holder to export the activity log.

mDLアプリは、アクティビティログを維持できなければならない。mDLアプリは、アクティビティログを保持するかどうかをmDL保持者が決定できなければならない。mDLアプリは、セットアップ時に、mDL保有者がアクティビティログの保持の可否を明示的に選択することを推奨します(すなわち、デフォルトではなく、さらにその後変更できるようにします)。アクティビティログおよび関連する設定は、mDL保持者のみがアクセス可能でなければなりません(4.6項も参照)。アクティビティログは、すべてのmDLトランザクションの記録を可能にしなければならない。ここでいう mDL トランザクションとは、mDL 保持者が mDL 検証者と情報を共有すること、および mDL と発行局との間でプロビジョニング、更新、または通信を行うことである。どのようなトランザクションでも、最低限、以下の情報は記録可能でなければならない: トランザクションのタイムスタンプ、トランザクションのタイプ(更新またはデータ共有など)、データ 共有トランザクションの場合は共有されたデータ、および収集可能な範囲で mDL 検証者の身元に関する情報。mDLアプリは、活動ログに記録される活動の種類を選択する機能をmDL保持者に提供することが推奨される(すなわち、「all or nothing」オプションのみではなく)。また、mDLアプリには、mDL保持者がmDL保持者のデバイスの能力の範囲内でアクティビティログのサイズを監視および管理するのに役立つ機能が含まれることが推奨されます。mDLアプリは、mDL保持者がアクティビティログをエクスポートできるオプションを提供する必要があります。

次はログの話題です。アクティビティログはプライバシーの観点からも非常に重要なものですので、Holderが完全に制御できるものである必要があることが強調されています。この辺りもウォレットソフトウェアを開発する際は留意したいポイントですね。

If an Issuing Authority allows an mDL holder to hold the same mDL on more than one device, the activity log settings on each device should be independent of each other. It is recommended that there be no synchronization of the activity log or activity log settings between the two devices. Any synchronization features that are provided must adhere to the following:

Synchronization must be an option that can be enabled or disabled by the mDL holder. The process to enable synchronization must require the mDL holder to prove access to both devices.  Synchronization must occur directly between the devices in question. A synchronization action must not give visibility of any of the following to anyone other than the mDL holder, or to anyone other than entities that already know that the mDL holder has an mDL on more than one device:

Activity log information. Activity log settings. The fact that a synchronization action/selection took place Any information that may convey that the mDL holder has an mDL on more than one device. 

発行局がmDL保持者に複数のデバイスで同じmDLを保持することを許可する場合、各デバイスのアクティビティログ設定は互いに独立しているべきである。2つのデバイス間でアクティビティログまたはアクティビティログ設定の同期は行わないことが推奨される。提供される同期機能は、以下に従わなければならない:

同期は、mDL保持者が有効または無効にできるオプションでなければならない。同期を有効にするプロセスでは、mDL保持者が両方のデバイスへのアクセスを証明する必要があること。 同期化は、当該デバイス間で直接行われなければならない。同期化アクションは、mDL保持者以外、またはmDL保持者が複数のデバイスにmDLを持つことを既に知っているエンティティ以外の者に、以下のいずれかを可視化してはならない:

アクティビティログ情報。 アクティビティログの設定。 同期アクション/選択が行われた事実。 mDL保持者が複数のデバイスでmDLを使用していることを伝える可能性のあるあらゆる情報。

 複数デバイスをHolderが使っている場合のログの同期の話です。これもせっかくコンテキストによってデバイスを分けているにも関わらずログが同期されてしまうとコンテキスト違反が起きてしまうことになるのでちゃんと分けましょう、という話ですね。


今日はこのあたりで。

 

 

 

 

 

 

 

 




@_Nat Zone

世界のデジタルIDと認証技術の最新トレンド:12月28日版

Block、分散型デジタルIDのオープンソース技術をDIFに移管 Blockは、子会社であるTBDを閉鎖したことを受けて、分散型デジタルIDのために開発したオープンソースコンポーネントを分散型アイデンティティ財団(DIF)に引き継ぐことを発表しました。 発表によると、DIDメソッ…
Block、分散型デジタルIDのオープンソース技術をDIFに移管

Blockは、子会社であるTBDを閉鎖したことを受けて、分散型デジタルIDのために開発したオープンソースコンポーネントを分散型アイデンティティ財団(DIF)に引き継ぐことを発表しました。

発表によると、DIDメソッド「did:dht」、検証可能な証明書(VC)、分散型ウェブノードを含む分散型IDコードのオープンソースリポジトリは、今後DIFのエコシステム内に移管されるとのことです。

(参考文献)

https://blog.identity.foundation/block-contributes-to-dif/ (2024-11-28) フランスの主要4大携帯通信事業者(Bouygues Telecom、Free、Orange、SFR)は、デジタルID保護の強化とオンライン詐欺対策のために共同イニシアチブを発表

フランスの主要4大携帯通信事業者(Bouygues Telecom、Free、Orange、SFR)は、デジタルID保護の強化とオンライン詐欺対策のために共同イニシアチブを発表しました。この取り組みは、ネットワークベースのサービスを標準化するGSMA Open Gatewayイニシアチブの一環であり、Linux Foundationが開発したオープンソースプロジェクト「CAMARA」を基盤としています。

事業者は、KYCマッチAPIとSIMスワップAPIという2つのAPIを導入し、オンラインビジネス向けの身元確認を改善します。また、一部の事業者は番号確認サービスも提供します。フランスは、主要事業者全てがKYCマッチAPIを共同で展開する初の国となりました。

(参考文献)

French Mobile Industry Accelerates Deployment of Network APIs Through GSMA Open Gateway initiative https://newsroom.orange.com/french-mobile-industry-accelerates-deployment-of-network-apis-through-gsma-open-gateway-initiative/ (2024-12-03) Bouygues, Free, Orange & SFR Launch Fraud-Prevention APIs in France https://www.thefastmode.com/technology-solutions/38493-bouygues-free-orange-sfr-launch-fraud-prevention-apis-in-france (2024-12-06) SIM Swap – CAMARA – France 0.2 https://developer.orange.com/apis/camara-sim-swap-france Apple Walletのデジタル運転免許証、対応地域が10カ所に拡大

Apple Walletのデジタル運転免許証および州IDの対応地域が、ニューメキシコ州とプエルトリコを加え、アメリカ国内の10地域に拡大しました。この機能は現在、アリゾナ州、カリフォルニア州、コロラド州、ジョージア州、ハワイ州、アイオワ州、メリーランド州、ニューメキシコ州、オハイオ州、プエルトリコで利用可能です。この拡大は、2022年3月にアリゾナ州が初めてプログラムを開始して以来の進展を示しています。

(参考文献)

Apple Wallet Digital ID Support Expands to 10 U.S. Jurisdictions with New Mexico, Puerto Rico Addition https://mobileidworld.com/apple-wallet-digital-id-support-expands-to-10-u-s-jurisdictions-with-new-mexico-puerto-rico-addition/#:~:text=Apple%20Wallet’s%20digital%20driver’s%20license,%2C%20Ohio%2C%20and%20Puerto%20Rico. (2024-12-14)

Friday, 27. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む⑥

こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 ようやく4章の「PRIVACY AND SECURITY」に入ります。4章も結構長いんですよね。。。ただ、結構重要な章なので細かくみていきたいと思います。 4.1. INTRODUCTION The privacy of an mDL holder has been paramount in the mDL design process from the start. Care was and is being taken in all the work to ensure that methods and means are available to protect mDL h
こんにちは、富士榮です。
引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。

ようやく4章の「PRIVACY AND SECURITY」に入ります。4章も結構長いんですよね。。。ただ、結構重要な章なので細かくみていきたいと思います。
4.1. INTRODUCTION
The privacy of an mDL holder has been paramount in the mDL design process from the start. Care was and is being taken in all the work to ensure that methods and means are available to protect mDL holder privacy. The subsections that follow elaborate in more detail on different aspects of privacy protection and security.

mDLの設計プロセスでは、当初からmDL保持者のプライバシーが最優先されてきました。すべての作業において、mDL保持者のプライバシーを保護する方法と手段が利用できるよう、細心の注意が払われています。以下のサブセクションでは、プライバシー保護とセキュリティのさまざまな側面について詳しく説明します。

4.2. DATA MINIMIZATION AND SELECTIVE DATA RELEASE

A primary component of privacy involves the ability of an mDL holder to only share some information. This is achieved by two related but distinct measures:

Data minimization: A decision by an Issuing Authority to record fractional information about an attribute in an mDL, thus empowering an mDL holder to share less information than would otherwise have been the case. For example, an Issuing Authority can decide to include9 the optional age_birth_year field in an mDL in addition to the (mandatory) date of birth. This will allow the mDL holder to share only a birth year as opposed to a date of birth. Another example would be to include the resident city in addition to a full address.  Selective data release: Allowing an mDL holder to decide which of the data fields requested by an mDL verifier will be released to the Verifier.

As noted in section 2, it is important for Issuing Authorities to understand that ISO/IEC 18013-5 primarily specifies interfaces. The interfaces support both data minimization and selective data release. It is recommended that Issuing Authorities implement and provision as many of the optional minimized data elements, defined in ISO/IEC 18013-5 and in this document, as possible.

プライバシーの主要な構成要素は、mDL保持者が一部の情報のみを共有する能力である。これは、2つの関連するが異なる手段によって達成される:

データの最小化:データの最小化:発行局が、mDLに属性情報の一部を記録することを決定すること。例えば、発行局はmDLに、(必須である)生年月日に加え、オプションのage_birth_yearフィールドを含める9 ことができます。これにより、mDLの所持者は、生年月日ではなく、生年のみを共有することができます。他の例としては、完全な住所に加えて、居住地の市町村を含めることができる。 選択的データ公開:mDL保有者が、mDLベリファイアから要求されたデータフィールドのうち、どのフィールドをベリファイアに開示するかを決定できるようにすること。

セクション2で述べたように、発行局はISO/IEC 18013-5が主にインタフェースを規定していることを理解することが重要である。インターフェースはデータの最小化と選択的なデータ公開の両方をサポートする。発行局は、ISO/IEC 18013-5 および本文書で定義されているオプションの最小化データエレメントを可能な限り実装し、提供することが推奨される。

Privacy by designということです。ISO/IEC 18013-5ではデータの最小化と選択的情報開示の両方をサポートしているので、本書の原則を踏まえてちゃんと実装しなさいよ、と。

 

In addition, Issuing Authorities must ensure that mDL apps to which they provision data support at least the following: 

In case the request was received electronically, the mDL app must clearly convey what data was requested, and whether the mDL verifier intends to retain the information. If the request is presented in summarized form in the user interface (e.g. “Identity and driving privilege data” as opposed to “First Name, Last Name, DOB, Driving privileges”), means must be available to give the mDL holder visibility of the details of such a summarized form, both before and during a transaction. The mDL app must provide the mDL holder full control over which data elements to share with the mDL verifier.  ISO/IEC 18013-5 requires the portrait image to be shared if the portrait was requested and if any other data element is released (to enable the mDL verifier to tie the mDL information to the person presenting the information). The app must support a graceful and informed exit from the request if the holder opts not to share the portrait image when requested. If blanket sharing options are used, measures must be implemented to ensure that the mDL holder remains aware of what is being released when such an option is in effect. An mDL holder must also be able to opt out of or cancel any blanket sharing function.

Issuing Authorities (and their app providers) are encouraged to devise solutions that will minimize transaction friction without compromising the above requirements.

さらに、発行局はデータを提供するmDLアプリが少なくとも以下をサポートしていることを確認する必要があります:

要求が電子的に受信された場合、mDLアプリは、どのようなデータが要求されたのか、またmDLベリファイアがその情報を保持する意図があるかどうかを明確に伝えなければならない。要求がユーザーインターフェースに要約された形で提示される場合(例えば、「姓名、DOB、運転権限」ではなく「身分証明書および運転権限データ」)、取引の前および取引中の両方において、mDL保有者がそのような要約された形の詳細を可視化できる手段を利用できなければなりません。 mDLアプリは、どのデータ要素をmDLベリファイアと共有するかについて、mDL保持者に完全なコントロールを提供しなければならない。 ISO/IEC 18013-5では、肖像画が要求された場合、およびその他のデータ要素が公開された場合、肖像画を共有することが要求されています(mDLベリファイアがmDL情報を提示者に紐付けることを可能にするため)。アプリは、所持者が要求されたときに肖像画を共有しないことを選択した場合、その要求から 潔く、かつ通知された形で抜けることをサポートしなければならない。 包括的共有オプションが使用される場合、そのようなオプションが有効であるとき に、mDL保有者が何が公表されるかを確実に認識し続けるための措置が講じられなけれ ばならない。また、mDLの保有者は、包括的共有機能をオプトアウトまたはキャンセルできなければならない。

発行局(およびそのアプリプロバイダ)は、上記の要件を損なうことなく、取引の摩擦を最小化するソリューショ ンを考案することが推奨される。 

データを要求・共有する目的・意図を明確に伝える、そして提供しないことをユーザが選択できるようにする、オプトアウトできるようにもする、と。どれも基本的なことではありますが実装者にとってはどのようなUXを提供するかが腕の見せ所になると重要なポイントの一つでもあります。この辺りは日本でもウォレット開発をする方々も参考にすべき点だと思います。


細かくみていこうと思うので少し細切れにしていきます。

ということで今日はここまで。

 

 

 

 


Werdmüller on Medium

Creating a framework for living well

Drawing upa North Star for building my life Continue reading on Medium »

Drawing upa North Star for building my life

Continue reading on Medium »

Thursday, 26. December 2024

Hyperonomy Digital Identity Lab

Web 7.0 Foundation: SDO Accreditation

The Web 7.0 Foundation is a relatively new organization, incorporated in Canada on May 1, 2023². It focuses on developing specifications and standards for a unified software and hardware ecosystem aimed at building resilient, trusted, and decentralized systems¹³. Source: Conversation … Continue reading →

The Web 7.0 Foundation is a relatively new organization, incorporated in Canada on May 1, 2023². It focuses on developing specifications and standards for a unified software and hardware ecosystem aimed at building resilient, trusted, and decentralized systems¹³.

Source: Conversation with Copilot, 12/27/2024

(1) Web 7.0 Foundation | Canada Corporation Directory. https://www.canadacompanyregistry.com/companies/web-70-foundation/.
(2) Web7Foundation/Specifications: Web 7.0 Foundation Specifications – GitHub. https://github.com/Web7Foundation/Specifications.
(3) Web 7.0 Overview – YouTube. https://www.youtube.com/watch?v=UM1__hsa2Zk.

Standards Development Organizations (SDOs) typically seek accreditation to demonstrate their competence and adherence to specific procedures and standards. One prominent accreditation body is the International Accreditation Service (IAS), which provides accreditation based on criteria such as AC803¹². This accreditation involves an assessment of the SDO’s standardization process, procedures, and management system².

In the United States, the American National Standards Institute (ANSI) accredits SDOs that follow a consensus-based process³. This ensures that the standards developed are the result of a transparent, balanced, and inclusive process.

Accreditation helps SDOs validate their ability to consistently develop high-quality normative documents, enhancing trust and credibility in their standardization efforts².

Source: Conversation with Copilot, 12/27/2024

(1) Standards Development Organizations – International Accreditation …. https://www.iasonline.org/services/standards-development-organizations/.
(2) IAS Creates Accreditation Program for Standard Development Organizations. https://www.iasonline.org/ias-creates-accreditation-program-for-standard-development-organizations/.
(3) Organizations Developing Standards – Standards Coordinating Body. https://www.standardscoordinatingbody.org/sdos/.
(4) Accreditation Criteria for Standards Development Organizations (AC803). https://www.iasonline.org/resources/accreditation-criteria-for-standards-development-organizations-ac803/.


IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む⑤

こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 まだ3章が続きますが今回で3章は終わりです。 3.6. IACA ROOT CERTIFICATE In Table B.1 of ISO/IEC 18013-5, on the table row for the “ISSUER” certificate component, replace: stateOrProvinceName is optional. If this element is present, the element shall also be present in the end-entity certificates and hold the same va

こんにちは、富士榮です。

引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。


まだ3章が続きますが今回で3章は終わりです。


3.6. IACA ROOT CERTIFICATE

In Table B.1 of ISO/IEC 18013-5, on the table row for the “ISSUER” certificate component, replace:

stateOrProvinceName is optional. If this element is present, the element shall also be present in the end-entity certificates and hold the same value. 

with the following:

stateOrProvinceName is mandatory. The element shall also be present in the end-entity certificates and hold the same value.  

ISO/IEC 18013-5 の Table B.1 の 「ISSUER 」証明書コンポーネントの表行で、以下を置き換える:

stateOrProvinceName はオプションである。この要素が存在する場合、この要素はエンドエンティティ証明書にも存在し、同じ値を保持するものとする。

を以下のように置き換える:

stateOrProvinceName は必須である。この要素は、エンド・エンティ ティティの証明書にも存在し、同じ値を保持するものとする。


やはりモバイル運転免許証にISO/IEC 18013-5を当てはめるとき、ちょいちょい書き換えするところがありますね。


3.7. VERSIONING

The data structure for the 2D barcode in the AAMVA Card Design Specification contains a version number. This enables readers to always know which version of the data structure is present on a credential since the full data string is always read. This is not true for an mDL. An mDL reader has to explicitly request individual data elements, and does not know in advance which data elements are present or what version of a data set is supported.

AAMVA カード設計仕様の 2D バーコードのデータ構造には、バージョン番号が含まれている。これにより、完全なデータ文字列が常に読み取られるため、読み手はデータ構造のどのバージョンがクレデンシャルに存在するかを常に知ることができる。これは mDL には当てはまらない。mDL リーダは個々のデータ要素を明示的に要求する必要があり、どのデータ要素が存在する か、またはデータ・セットのどのバージョンがサポートされているかを事前に知ることはできない。

One approach to address this is to add a “version” data element to the AAMVA namespace. To be useful an mDL reader would have to obtain this data element before making a subsequent request for additional data. Allowing the release of this data element without mDL holder approval is possible; requiring approval may confuse an mDL holder and increase transaction friction. Regardless, the 2-step process would add complexity (an mDL reader would still have to allow for not receiving a response to such a request) and add time to the transaction. Such an approach would also be unique to mDL in North America.

これに対処する1つの方法は、AAMVA名前空間に「バージョン」データ要素を追加することである。mDLの読者は、追加データを要求する前にこのデータ要素を取得しなければならない。mDL保持者の承認なしにこのデータ要素の公開を許可することは可能です。承認を必要とすると、mDL保持者を混乱させ、取引の摩擦を増大させる可能性があります。いずれにせよ、2段階のプロセスは複雑さを増し(mDLリーダーは、そのような要求に対する返答を受け取らないことを許容しなければならない)、取引に時間を要する。また、このようなアプローチは北米のmDLに特有のものである。

Instead, versioning of the AAMVA mDL data element set is achieved as follows:

If needed, create a new identifier. This applies if there is a change to an existing data element, or if a completely new data element is added. Set a date by which mDL apps and mDL readers must support the new identifier (Dayx in Figure 2). “Support” as used here means that an mDL app must allow an Issuing Authority to provision the identifier into the app, and that an mDL reader must be able to read the new identifier.  For the old identifier, set a date by which mDL apps and mDL readers do not need to support the old identifier anymore (Dayy in Figure 2). This is also the date by which Issuing Authorities must be provisioning the new identifier.

代わりに、AAMVA mDLデータ要素セットのバージョニングは、以下のように行われる:

必要に応じて、新しい識別子を作成する。これは、既存のデータ要素に変更がある場合、またはまったく新しいデータ要素が追加される場合に適用されます。mDLアプリとmDLリーダーが新しい識別子をサポートしなければならない期日を設定します(図2のDay x)。ここでいう「サポート」とは、mDLアプリが発行機関に識別子をアプリにプロビジョニングできるようにすること、およびmDLリーダーが新しい識別子を読み取れるようにすることを意味します。 旧識別子については、mDLアプリとmDLリーダーが旧識別子をサポートする必要がなくなる日付を設定します(図2のDay y)。これは、発行局が新しい識別子をプロビジョニングする期日でもあります。 

Figure 2 also reflects other requirements on both the mDL reader and the mDL app. The main advantage of the approach illustrated in Figure 2 is that, in case of changing an existing identifier, the Issuing Authority will have the time between the two dates to provision the new identifier (and deprecate the old identifier) to all its mDLs with the knowledge that mDL readers should be able to accommodate either identifier (the highlighted option in Figure 2). In the case where a new identifier is added (i.e. when there is no change to an existing identifier), the two dates may be on the same day.

図2には、mDLリーダーとmDLアプリの両方に対するその他の要件も反映されています。図2に示されたアプローチの主な利点は、既存の識別子を変更する場合、発行局は2つの日付の間に、mDLリーダーがどちらの識別子にも対応できることを前提に、すべてのmDLに新しい識別子を提供する(古い識別子を廃止する)時間を持つことができることです(図2のハイライトされたオプション)。新しい識別子が追加される場合(既存の識別子に変更がない場合)、2つの日付は同じ日になる可能性があります。

Ideally mDL readers would ask for the old identifier up to Dayy and for the new identifier thereafter. However, it is likely that readers would, at least around the change date, ask for both. It is also likely that an mDL would, especially around Dayy, include both identifiers. How the request is presented to the mDL holder, and how approval to share is administered, is left to implementers. Nevertheless, a simple approach could be for the mDL to present only one request, for the new identifier, to the mDL holder.

理想的には、mDLの読者はDay yまでは旧識別子を、それ以降は新識別子を要求するだろう。しかし、少なくとも変更日前後には、読者は両方の識別子を要求すると思われる。また、mDLは、特にDayyの前後には、両方の識別子を含むと思われる。どのようにリクエストをmDL保持者に提示し、どのように共有の承認を行うかは、実装者に委ねられている。とはいえ、単純なアプローチとしては、mDLがmDL保持者に提示する要求は、新しい識別子のための1つのみである。


バージョニングに関するコンセプトがちゃんとしていますね。リードタイムをうまく作ってスムーズに移行できる様にすることができる様にしています。


3.8. ISSUING AUTHORITY SPECIFIC DATA
ISO/IEC 18013-5 allows for the creation of additional namespaces, in like manner as the AAMVA namespace defined in this document (see clause 7.2.8 in ISO/IEC 18013-5). Issuing Authorities can use this mechanism to add additional fields to an mDL. The Issuing Authority would be responsible for communicating such an additional namespace to mDL verifiers that need to be able to read the Issuing Authority-specific data. Note: ISO/IEC 18013-5 also lends itself to being adopted for the issuing of credentials separate from an mDL, for example fishing licenses, health credentials, or watercraft licenses. 

ISO/IEC 18013-5では、本文書で定義されているAAMVA名前空間と同様に、追加の名前空間を 作成することができる(ISO/IEC 18013-5の7.2.8項参照)。発行局はこのメカニズムを使用して、mDLにフィールドを追加できる。発行局は、発行局固有のデータを読み取る必要のあるmDL検証者に、このような追加名前空間を伝達する責任を負う。

注:ISO/IEC 18013-5 は、漁業免許証、健康証明書、水上バイク免許証など、mDL とは別のクレデンシャルの発行にも採用できる。


今回はここまでです。次は4章です。



Wednesday, 25. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む④

こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 引き続き3章を読んでいきます。 3-3. PORTRAIT IMAGE The portrait image is the primary means by which an mDL is matched to the person presenting the mDL in an attended transaction. The portrait image therefore needs to be of suitable quality for this purpose. ISO/IEC 18013-5 requires the portrait to comply with Ann

こんにちは、富士榮です。

引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。



引き続き3章を読んでいきます。

3-3. PORTRAIT IMAGE

The portrait image is the primary means by which an mDL is matched to the person presenting the mDL in an attended transaction. The portrait image therefore needs to be of suitable quality for this purpose. ISO/IEC 18013-5 requires the portrait to comply with Annex D of ISO/IEC 18013-2:2020, which in turn requires the portrait image to be at least 192 pixels wide and 240 pixels high. In addition, ISO/IEC 18013-2 requires portrait images intended for automated face recognition to comply with ISO/IEC 19794-5, which among other requirements requires 90 pixels between the centers of the eyes. However, it should be noted that these requirements were created in the context of storage on a physical card and in machine-readable formats with limited storage capacity compared to an mDL. 

肖像画像は、立会取引においてmDLを提示する人物とmDLを照合する主要な手段です。したがって、肖像画像はこの目的に適した品質である必要があります。ISO/IEC 18013-5は、肖像画がISO/IEC 18013-2:2020の附属書Dに準拠することを要求しており、この附属書Dは、肖像画が少なくとも幅192ピクセル、高さ240ピクセルであることを要求している。さらに、ISO/IEC 18013-2は、自動顔認識用の肖像画像について、ISO/IEC 19794-5に準拠することを要求しており、この要件では、特に目の中心間が90ピクセルであることが要求されています。ただし、これらの要件は、物理的なカードへの保存や、mDLに比べて保存容量が限られる機械読み取り可能なフォーマットでの保存を想定して作成されたものであることに留意する必要があります。

It would therefore be possible to include a portrait image of much higher resolution in an mDL. Arguments for going this route include higher accuracy when using the portrait image as a probe image in 1:n biometric searching, and making it easier for a human to compare the portrait image with the mDL holder. Arguments against going this route include the following:

従って、mDLにはるかに高解像度の肖像画像を含めることが可能である。この経路をとることへの賛成意見には、1:nの生体認証検索でプローブ画像として肖像画を使用する際の精度が高くなること、人間が肖像画とmDLの所持者を比較しやすくなることなどがあります。このルートに反対する意見には、以下のようなものがあります:

1. A larger portrait image can negatively affect mDL transaction times(より大きなポートレート画像は、mDLのトランザクション時間に悪影響を与える可能性があります)

2. A better-quality portrait image could arguably be less privacy preserving than a smaller portrait image.(より質の高いポートレート画像は、より小さなポートレート画像よりもプライバシーの保護に劣る可能性がある)

3. The primary purpose of the portrait image is a 1:1 match with the mDL holder. If this match is performed biometrically, the smaller portrait size should be sufficient.(肖像画像の主な目的は、mDLの所持者と1対1で照合することです。この照合が生体認証で行われる場合は、肖像画のサイズは小さくても十分です)

Issuing Authorities should carefully consider all these points when deciding on a portrait image size. It is recommended that Issuing Authorities opt for a smaller rather than for a larger portrait image.

発行局は、肖像画のサイズを決定する際、これらの点を慎重に考慮する必要があります。発行局は、大きな縦長画像よりも小さな縦長画像を選ぶことを推奨します。

結構細かいレベルで顔写真の要件が決まっているんですね。


3.4. SIGNATURE IMAGE

ISO/IEC 18013-5 does not prescribe anything other than that the image shall be in JPEG or JPEG2000 format. Building on the requirements for a signature image in ISO/IEC 18013-1 and in the AAMVA Card Design Standard, if present the signature image must be an accurate and recognizable representation of the original signature. Care should be given to image capture, processing, digitization, and compression.

ISO/IEC 18013-5 は、画像が JPEG または JPEG2000 フォーマットであること以外には何も規定していない。ISO/IEC 18013-1およびAAMVAカード設計基準における署名画像の要件に基づき、署名画像が存在す る場合は、元の署名を正確かつ認識可能な形で表現しなければならない。画像のキャプチャ、処理、デジタル化、および圧縮には注意を払う必要がある。


3.5. MDL CRYPTOGRAPHIC PROTOCOLS

In line with recommendations from the US National Institute of Standards and Technology (NIST) and the Canadian Centre for Cyber Security, certain cryptographic constructs must not be supported for mDL solutions built in accordance with this document. At the same time, interoperability needs to be retained so mDL readers can successfully interact with an mDL originating from elsewhere. 

米国国立標準技術研究所(NIST)およびカナダ・サイバーセキュリティセンターの勧告に従い、この文書に従って構築されたmDLソリューションでは、特定の暗号構造をサポートしてはなりません。同時に、mDLリーダーが他の場所から発信されたmDLと正常にやり取りできるよう、相互運用性を維持する必要があります。

To this end, the AAMVA mDL Implementation Guidelines require the following changes to be applied to ISO/IEC 18013-5:

このため、AAMVA mDL実装ガイドラインでは、ISO/IEC 18013-5に以下の変更を適用することを要求している:

ここも量が多いので割愛しますが、Cipher SuiteをNISTの要求に従って変更したりしていますので、他の国が単純にmdocだからISO/IEC 18013-5に従ってリーダーを実装してもAAMVAのmDLは読めないって言う状態になるんだろうなぁ。。。と思います。


ということでここまでです。3章がもう少しだけ続きます。

Tuesday, 24. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む③

こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 今回は3章のISO/IEC 18013-5 QUALIFICATIONSです。 3.1. INTRODUCTION Issuing authorities electing to follow the guidance in this document must adhere to ISO/IEC 18013-5, including as qualified in this document. 本文書のガイダンスに従うことを選択した発行局は、本文書で修飾されている場合を含め、ISO/IEC 18013-5 を遵守しなければならない。 3.2. AAMVA MDL DATA ELEMEN

こんにちは、富士榮です。

引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。


今回は3章のISO/IEC 18013-5 QUALIFICATIONSです。

3.1. INTRODUCTION

Issuing authorities electing to follow the guidance in this document must adhere to ISO/IEC 18013-5, including as qualified in this document.

本文書のガイダンスに従うことを選択した発行局は、本文書で修飾されている場合を含め、ISO/IEC 18013-5 を遵守しなければならない。

3.2. AAMVA MDL DATA ELEMENT SET

This section specifies changes and additions to the ISO/IEC 18013-5 data element set to accommodate the unique needs of the AAMVA community. All the data elements (mandatory and optional) in the ISO/IEC 18013-5 data element set, together with the changes and additions specified in this document, comprise the AAMVA mDL data element set.

このセクションでは、AAMVAコミュニティの固有のニーズに対応するために、ISO/IEC 18013-5データ要素セットの変更と追加を規定する。ISO/IEC 18013-5 データ要素セットのすべてのデータ要素(必須およびオプション)は、本文書で 規定される変更および追加とともに、AAMVA mDL データ要素セットを構成する。

The specific changes to ISO/IEC 18013-5 follow.

ISO/IEC 18013-5に対する具体的な変更点は以下の通り。

Replace the 1st sentence of clause 7.2.1:

The mDL data elements shall be as defined in Table 5 belong to namespace “org.iso.18013.5.1”, see 7.1.

with the following:

The mDL data elements shall be as defined in Table 5. Data elements belong to the namespaces indicated. 

7.2.1 節の第 1 文を置き換える:

mDL データ要素は,表 5 に定義されるとおり,名前空間 「org.iso.18013.5.1 」に属するものとする。

を以下で置き換える

mDL データエレメントは,表 5 に定義されているとおりとする。データ要素は、示された名前空間に属する。

In Table 5, apply the following amendments:

表5において、以下の修正を適用する。

family_nameの定義 変更前:Last name, surname, or primary identifier, of the mDL holder. The value shall only use latin1b characters and shall have a maximum length of 150 characters.(mDL保持者の姓、名、またはプライマリ識別子。値はlatin1b文字のみを使用し、最大150文字とする)

変更後: Family name (commonly called surname or last name), or primary identifier, of the individual that has been issued the driver license or identification document. If the individual’s name is not divided into family name and given name(s), that name shall be deemed the family name or primary identifier. The value shall only use latin1b characters and shall have a maximum length of 150 characters.(運転免許証または身分証明書を発行された個人の姓(一般に姓または名と呼ばれる)、または主な識別子。個人の名前が姓と名に分かれていない場合は、その名前を姓または主な識別子とみなす。値はlatin1b文字のみを使用し、最大150文字とする) given_nameの定義 
変更前:First name(s), other name(s), or secondary identifier, of the mDL holder. The value shall only use latin1b characters and shall have a maximum length of 150 characters(mDL保持者のファーストネーム、その他のネーム、またはセカンダリ識別子。値はlatin1b文字のみを使用し、最大150文字とする。) 変更後: Given name or names (includes all of what are commonly referred to as first and middle names), or secondary identifier, of the individual that has been issued the driver license or identification document. The value shall only use latin1b characters and shall have a maximum length of 150 characters.(運転免許証または ID 文書を発行された個人の名前(一般にファーストネームおよびミドル ネームと呼ばれるものをすべて含む)、または二次識別子。値は、latin1b 文字のみを使用し、最大 150 文字の長さを持たなければならない。) height、eye_colour、resident_addressのプレゼンスをO(オプション)からM(必須)へ 
resident_addressの定義 変更前:The place where the mDL holder resides and/or may be contacted (street/house number, municipality etc.). The value shall only use latin1b characters and shall have a maximum length of 150 characters.(mDL保持者の居住地および/または連絡可能な場所(番地、市町村など)。値はlatin1b文字のみを使用し、最大150文字とする。)
変更後:The place where the mDL holder resides and/or may be contacted (street/house number, municipality etc.). The value shall only use latin1b characters and shall have a maximum length of 150 characters. The resident_address shall be included in full, regardless of the presence of any minimized address data elements (e.g. resident_city; resident_state; resident_postal_code; resident_country). Dayx for this change: Not applicable. Dayy for this change: 2025-09-01.(mDL保持者の居住地および/または連絡可能な場所(番地、市町村など)。値はlatin1b文字のみを使用し、最大150文字とする。resident_addressは、最小化された住所データ要素(resident_city; resident_state; resident_postal_code;resident_countryなど)の有無にかかわらず、完全な形で含まれるものとする) age_in_years、age_over_NN、issuing_jurisdictionのプレゼンスをOからMへ

In Table 5, add a new column titled “Namespace”. For the data elements present in ISO/IEC 18013-5, enter “org.iso.18013.5.1” for each data element

表5に、「Namespace 」というタイトルの新しい列を追加する。ISO/IEC 18013-5に存在するデータ要素については、各データ要素に 「org.iso.18013.5.1 」を入力する。

Append the following to Table 5:

表5に以下を追加する:

ネームスペース:“org.iso.18013.5.1.aamva” Identifier:domestic_driving_privileges 

意味合い:Domestic categories of vehicles/restrictions/conditions(国内車両カテゴリー/制限/条件)

定義:Vehicle types the license holder is authorized to operate. See 7.2.4.(免許保持者が運転することを許可されている車種。7.2.4を参照のこと) プレゼンス:M


ネームスペース:“org.iso.18013.5.1.aamva” Identifier:name_suffix 

意味合い:Name suffix 

定義:Name suffix of the individual that has been issued the credential. Only the following values are allowed:(クレデンシャルを発行された個人の名前サフィックス。以下の値のみが許可される:) JR、SR、1ST、Ⅰ、2ND、Ⅱ〜9TH、Ⅸ 

 プレゼンス:O 

 

ネームスペース:“org.iso.18013.5.1.aamva” Identifier:organ_donor 

意味合い:organ donor 定義:An indicator that denotes whether the credential holder is an organ donor. This field is either absent or has the following value:(クレデンシャル保持者が臓器提供者かどうかを示すインジケータ。このフィールドはないか、または以下の値を持つ:)
1: Donor 
 プレゼンス:O


こんな感じで意外と多くのISO/IEC 18013-5の属性群については修正を入れています。 この辺りは国によって状況も異なるので当然と言えるでしょう。(ガイドラインには上記に記載したもの以外にも変更されたものが羅列されていますが省略します)

少し面白いところで言うと、ISO/IEC 18013-5ではage_over_NNとなっている属性を

age_over_18 age_over_21 age_over_65 と言う形で米国の事情に合わせていたりするところもあります。

例えば25歳の人は

age_over_18=TRUE age_over_21=TRUE age_over_65=FALSE

となるようです。この表現はいいのかどうか・・・

こんな表現をすることを推奨していたりもします。

age_over_16=True

age_over_17=True

age_over_19=True

age_over_20=True

age_over_22=True

age_over_25=True

age_over_26=False

age_over_64=False

age_over_66=False

age_over_85=False 


一旦はここまでとします。

結構この章は長いですが、ISO/IEC 18013-5の扱いに関する話が多いのであまり中身はありませんね。

Monday, 23. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む②

こんにちは、富士榮です。 引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。 今回は2章のmDL Solution Overviewを見ていきます。 An mDL can be described as leveraging a mobile device to transfer (or cause to be transferred) driver’s license information to an mDL verifier, who cryptographically authenticates the information using the Issuing Authority’s public key. A visual rendering of a DL on a mo

こんにちは、富士榮です。

引き続きAAMVAのMobile Drivers License Implementation Guidelines 1.4を読んでいきます。


今回は2章のmDL Solution Overviewを見ていきます。

An mDL can be described as leveraging a mobile device to transfer (or cause to be transferred) driver’s license information to an mDL verifier, who cryptographically authenticates the information using the Issuing Authority’s public key. A visual rendering of a DL on a mobile device’s display (and which can be misused as a “flash pass”) therefore does not qualify as an mDL (also see section 8).

mDL は、発行局の公開鍵を使用して情報を暗号的に検証する mDL検証者に運転免許証情報を転送する (または転送させる)ために、モバイル機器を活用するものと説明できる。したがって、モバイル機器のディスプレイ上に DL を視覚的に表示するもの(「フラッシュパス」として悪用される可能性があるもの)は、mDL として認められない(セクション 8 も参照)。

スクショやオレオレはダメってことですね。 

An mDL solution can be described in terms of the following three properties:

mDLソリューションは、以下の3つの性質で説明できる:

1. Data retrieval method. The device retrieval method (sometimes referred to as the offline model) works without outside connectivity (for both the mDL holder’s device and the mDL reader) at the time the transaction takes place, thus requiring the mDL data to reside on the mDL holder’s device. Under the server retrieval method (sometimes referred to as the online model, and not to be confused with use of an mDL in an unattended transaction setting such as over the Internet) mDL data is retrieved in real time directly from the Issuing Authority. ISO/IEC 18013-5 requires an mDL to support device retrieval, and allows a device to additionally support server retrieval. 

1. データ検索方式。デバイス検索方式(オフラインモデルと呼ばれることもある)では、取引時に外部(mDL保持者のデバイスとmDLリーダーの両方)に接続することなく動作するため、mDLデータはmDL保持者のデバイスに存在する必要がある。サーバー検索方式(オンラインモデルと呼ばれることもあり、インターネット経由のような無人トランザクションでのmDLの使用と混同されないよう注意)では、mDLのデータは発行機関からリアルタイムで直接取得される。ISO/IEC 18013-5は、mDLがデバイスの検索をサポートすることを要求しており、さらにデバイスがサーバーの検索をサポートすることを認めている。

2. Transaction type. An attended transaction is one where the mDL holder and the mDL verifier are in close proximity to each other. The engagement mechanisms currently reflected in ISO/IEC 18013-5 (QR code, NFC) were selected to support such close proximity. An unattended transaction is one where the mDL holder and the mDL verifier are not in close proximity, e.g. when an mDL holder wants to provide identity or proof of age to an online retailer. ISO/IEC 18013-5 does not currently support unattended transactions. However, work is ongoing to standardize a solution. 

2. トランザクションの種類。対面型トランザクションとは、mDL保有者とmDL検証者が近接しているトランザクションのことである。現在ISO/IEC 18013-5に反映されているエンゲージメントの仕組み(QRコード、NFC)は、このような近接をサポートするために選択された。無人トランザクションとは、mDL 保持者と mDL 検証者が近接していないトランザクショ ンのことであり、たとえば、mDL 保持者がオンライン小売業者に ID または年齢証明を提供する場合などである。ISO/IEC 18013-5 は現在、無人トランザクションをサポートしていない。ただし、ソリューションを標準化する作業が進行中である。 

3. Timing of (and responsibility for) matching. This property is about the responsibility for confirming, at transaction time, that the person presenting the mDL data is the person described by the mDL data. In a post-matched transaction, the link between the mDL Presenter and the mDL data is made after the mDL data is shared and is performed by the mDL verifier. This happens by comparing the portrait image in the mDL with the person presenting the mDL. ISO/IEC 18013-5 supports postmatched transactions. In a pre-matched transaction, the link between the mDL Presenter and the mDL is made right before the mDL data is shared. Although the Issuing Authority should not be involved in real time, the Issuing Authority does take responsibility for certifying the link. The mDL verifier receives only the confirmation that the person presenting the mDL data is the person described by the shared mDL data. ISO/IEC 18013-5 does not currently support pre-matched transactions. However, work is ongoing to standardize a solution (and notably one that does not involve the Issuing Authority at transaction time).

3. 照合のタイミング(および責任)。このプロパティは、mDLデータの提示者がmDLデータに記述された本人であることをトランザクション時に確認する責任に関するものである。マッチング後のトランザクションでは、mDL提示者とmDLデータのリンクは、mDLデータが共有された後に行われ、mDL検証者によって実行される。これは、mDL内の肖像画像とmDL提示者を比較することで行われる。ISO/IEC 18013-5 はポストマッチトランザクションをサポートしている。事前照合トランザクションでは、mDL提示者とmDLのリンクは、mDLデータが共有される直前に行われる。発行局はリアルタイムで関与すべきではないが、発行局はリンクを認証する責任を負う。mDLの検証者は、mDLデータの提示者が共有されたmDLデータに記述された本人であることの確認のみを受ける。ISO/IEC 18013-5は現在、事前照合トランザクションをサポートしていない。しかし、(特にトランザクション時に発行局が関与しない)ソリューションを標準化するための作業が進行中である。

デバイスリトリーバル、サーバーリトリーバルの2方式があること、対面、非対面のシナリオが定義されていること、そして検証者がHolderバインディングを行うことが求められている、ということです。本人確認書類として利用することを考えると当然ですね。 

With this as background, Figure 1 provides a high-level overview of the mDL ecosystem described in ISO/IEC 18013-5.

これを背景に、図1はISO/IEC 18013-5で説明されているmDLエコシステムのハイレベルな概要を示している。



Three interactions are involved:

3つの相互作用が関係している: 

1. Interaction between the Issuing Authority and the mDL. This interaction results in getting everything onto an mDL holder’s device that is needed to use the mDL. There is also subsequent interaction between the Issuing Authority and the mDL to keep the mDL information updated. Technical components of this interaction will be standardized in the ISO/IEC 23220 series.

1. 発行局とmDLの間のインタラクション。このやりとりの結果、mDLを使用するために必要なすべての情報がmDLホルダーのデバイスに取り込まれます。また、発行局とmDLの間には、mDLの情報を更新するための相互作用があります。このインタラクションの技術的なコンポーネントは、ISO/IEC 23220シリーズで標準化される予定です。

Issueの時の仕組みですね。OpenID for Verifiable Credential Issuanceでもmdocを扱うことができますので、そちらを非対面のシナリオでは使うケースもありますが、ここではISO 23220が挙げられています。 

2. Interaction between the mDL and the mDL reader infrastructure of the mDL verifier. This interaction comprises the transfer of technical information to set up a secure communication channel between the two parties, and the subsequent exchange of the driver’s license information (or of a point from where it can be retrieved) that the mDL holder agreed to share. ISO/IEC 18013-5 fully standardizes an interface describing this interaction.

2. mDLとmDL検証装置のmDL読み取りインフラ間のインタラクション。このインタラクションは、両者間の安全な通信チャネルを設定するための技術情報の転送と、それに続く mDL 保持者が共有に同意した運転免許証情報(またはそれを取得できるポイント)の交換で構成される。ISO/IEC 18013-5 は、このインタラクションを記述するインタフェースを完全に標準化する。

こちらはPresentationの話ですね。こちらもOpenID for Verifiable Presentationでも対応ができる範囲です。ここではISO 18013-5での対応が挙げられています。 

3. Interaction between the mDL reader infrastructure and the Issuing Authority. This interaction can be used for different purposes, depending on the data retrieval method involved:

Device retrieval method: The interaction is used by the mDL verifier to obtain the public keys needed to authenticate mDL information. Such interaction can also involve an intermediary entity that aggregates and disseminates certificates. (In North America, AAMVA’s Digital Trust Service performs this function – see section 5.) Regardless, the mDL verifier must trust that the certificate truly comes from a valid Issuing Authority. This interaction does not need to occur at the time of an mDL transaction. ISO/IEC 18013-5 fully standardizes a method supporting this interaction. Server retrieval method: The interaction is used by the mDL verifier for two purposes: As in the case for the device retrieval method, to obtain the public key of the Issuing Authority To pass to the Issuing Authority, in real time, a token that identifies the mDL holder and the mDL, and to receive the actual mDL information back from the Issuing Authority. ISO/IEC 18013-5 fully standardizes an interface describing this interaction

3. mDLリーダーインフラと発行局との間のインタラクション。このインタラクションは、関係するデータ検索方法に応じて、異なる目的で使用することができる:

デバイスの検索方法: このインタラクションは、mDL 検証者が mDL 情報の検証に必要な公開鍵を取得するために使用される。このようなインタラクションには、証明書を集約し普及させる仲介エンティティが関与することもできる。(北米では、AAMVA のデジタル・トラスト・サービスがこの機能を果たす。) いずれにせよ、mDLの検証者は、証明書が本当に有効な発行機関から発行されたものであることを信頼しなけれ ばならない。この相互作用は、mDLのトランザクション時に発生する必要はない。ISO/IEC 18013-5は、この相互作用をサポートする方法を完全に標準化している。 サーバーの検索方法: このインタラクションは、mDL検証者によって2つの目的で使用される: デバイス検索方式と同様に、発行局の公開鍵を取得する。 mDLの所有者とmDLを識別するトークンをリアルタイムで発行局に渡し、実際のmDL情報を発行局から受け取ること。ISO/IEC 18013-5は、このインタラクションを記述するインタフェースを完全に標準化している。

ここはデバイスリトリーバルなのかサーバーリトリーバルなのかで異なりますが、mDLリーダーがIssuerへの問い合わせを行うケースについて記載されていますね。いわゆるDIDを使ったVCとの大きな違いはIssuing Authorityが完全に中央集権であることかと思います。(免許なので当然ですね)そのため、検証用の公開鍵を取得する場合は堂々とVerifierからIssuerへのインタラクションが発生しています。(ここは若干プライバシーとのトレードオフはありますが) 

Note that ISO/IEC 18013-5 specifies system interfaces and a certificate exchange method, and on purpose does not address the user interface (e.g. the look, feel and functionality of an mDL app residing on an mDL holder’s device). It is left up to Issuing Authorities (and their implementers) to innovate in this area.

ISO/IEC 18013-5は、システム・インターフェースと証明書交換方法を規定するものであり、ユーザ・イン ターフェース(例えば、mDL保有者のデバイスに常駐するmDLアプリのルック、フィール、機能性)については、 意図的に触れていないことに留意されたい。この分野での技術革新は、発行局(およびその実装者)に委ねられている。


ということで、本日はここまで。


Sunday, 22. December 2024

IdM Laboratory

AAMVAのMobile Drivers License Implementation Guidelinesを読む①

こんにちは、富士榮です。 先日、用語を見たついでにAAMVAが出しているMobile Drivers License Implementation Guidelines 1.4を読んでいこうと思います。 こちらが原文です。 まずはIntroductionから。 The AAMVA Joint Mobile Driver’s License (mDL) Working Group (WG) has been active around mobile identification since 2012. As the mDL evolves, the mDL WG continues to identify and address topics on which guidance to Issuing Authorities can be helpful. T
こんにちは、富士榮です。
先日、用語を見たついでにAAMVAが出しているMobile Drivers License Implementation Guidelines 1.4を読んでいこうと思います。

こちらが原文です。
まずはIntroductionから。
The AAMVA Joint Mobile Driver’s License (mDL) Working Group (WG) has been active around mobile identification since 2012. As the mDL evolves, the mDL WG continues to identify and address topics on which guidance to Issuing Authorities can be helpful. This document represents the bulk of the current guidance, and points to additional resources as needed.

AAMVA 合同モバイル運転免許証(mDL)ワーキンググループ(WG)は、2012 年以来、モバイル ID を中心に活動してきました。mDL の進化に伴い、mDL WG は、発行機関へのガイダンスが役立つトピックを特定し、対処し続けています。この文書は、現在のガイダンスの大部分を示し、必要に応じて追加のリソースを示します。

The goal of this document is to inform and equip Issuing Authorities, and to some extent mDL verifiers, to achieve the following:

この文書の目的は、発行局、そしてある程度mDLの検証者に対し、以下のことを達成するための情報を提供し、装備させることです:

Technical interoperability between different Issuing Authorities’ mDL programs, i.e., an Issuing Authority being able to read an mDL issued by any other Issuing Authority. Trust in different Issuing Authorities’ mDLs. Privacy preserving implementations.  異なる発行局のmDLプログラム間の技術的な相互運用性。つまり、発行局は他の発行局が発行したmDLを読むことができる。 異なる発行局のmDLに対する信頼性 プライバシーの保護

まずは目的からですが、アメリカでは州ごとに免許証を発行しているため、相互運用性は非常に重要になってくる、というところだと思います。 

It is up to Issuing Authorities to determine the extent to which the guidance in this document is followed.

Nevertheless, the minimum measures deemed necessary to achieve the above are labeled as mandatory requirements in this document (i.e. “shall” or “must”). A summary of minimum measures can be found in Appendix B.

本文書のガイダンスにどの程度従うかは、発行当局の判断に委ねられます。とはいえ、上記を達成するために必要とみなされる最低限の対策は、本文書では必須要件(すなわち「しなければならない」または「しなければならない」)と表示されています。最小限の措置の要約は付録Bに記載されています。

先にも書いた通り、州ごとに発行しているのでこのガイドラインの強制力も一定程度にとどまる感じなんですね。確かに後半に出てくるリテンション期間の話や複数枚数の発行の可否などはかなり現場に判断を委ねているところもあります。このあたりは念頭に読み進める必要がありそうです。 

The following topics are outside the scope of this document:

以下のトピックは本文書の範囲外です:

The identity establishment, management and recordkeeping that precedes the creation of an identity credential. Responsibilities of mDL verifiers. 

ID クレデンシャルの作成に先立つ、ID の確立、管理、および記録管理。 mDL 検証者の責任。

あくまでmDLの発行と管理に関するところがスコープっぽいですね。

This document leverages and expands on ISO/IEC 18013-51 (also available as INCITS/ISO/IEC 18013-5), an international mDL standard. Although ISO/IEC 18013-5 specifies an mDL solution, it was intentionally designed to support any type of mobile identity credential. ISO/IEC 18013-5, as qualified in this document, will therefore enable Issuing Authorities to issue both mobile driver’s licenses and mobile identification cards.

The term “mDL” as used in this document covers both credential types. Qualifications made in this document also allow for identifying an mDL as being REAL ID compliant or not, and/or as a credential issued under the Enhanced Driver’s License program (“EDL”; see the AAMVA DL/ID Card Design Standard).

本文書は、国際 mDL 標準である ISO/IEC 18013-5(INCITS/ISO/IEC 18013-5 としても利用可能)を活用し拡張したものです。ISO/IEC 18013-5 は mDL ソリューションを規定していますが、意図的にあらゆるタイプのモバイル ID クレデンシャルをサポートするように設計されています。このため、本文書で規定する ISO/IEC 18013-5 により、発行機関はモバイル運転免許証とモバイル ID カードの両方を発行できるようになります。

本文書で使用する「mDL」という用語は、両方のクレデンシャル・タイプをカバーします。この文書で行われる認定は、mDL を REAL ID 準拠かどうか、および/または拡張運転免許証プログラム(「EDL」;AAMVA DL/ID カード設計基準参照)の下で発行されたクレデンシャルとし て識別することも可能にします。

本書はISO/IEC 18013-5がベースであり、モバイル運転免許証とモバイルIDカードの両方を対象に書かれている、というところが肝ですね。そしてやはりリアルID法に関しても視野に入っています。

Additional guidance on mDL administration in the areas of legislation and procurement can be found in two other documents produced by the mDL Working Group. Those are the mDL Model Legislation, and the mDL Procurement Guidance (see the jurisdictional member area on the AAMVA website). AAMVA also conducts regular outreach to stakeholders on the topic of mDL, including town hall meetings, podcasts, and training.

mDLに関する法律や調達に関するガイダンスは、mDLワーキンググループが作成した2つの文書に記載されています。これらは、「mDLモデル法案」と「mDL調達ガイダンス」です(AAMVAウェブサイトの管轄メンバーエリアを参照)。AAMVAはまた、タウンホールミーティング、ポッドキャスト、トレーニングなど、mDLに関するステークホルダーへの定期的な働きかけも行っています。

It should be noted that mDL and related technologies are ever evolving. As a result, this document will continue to be updated to synchronize its content with the latest standards and practices. For this reason, readers of this document are encouraged to periodically check the AAMVA website for new versions.

mDLと関連技術は常に進化しています。そのため、本書は最新の基準や慣行と内容を同期させるために更新され続けます。このため、本書の読者は、定期的にAAMVAのウェブサイトで新バージョンを確認することが推奨されます。

AAMVAのウェブサイトを見ると色々な情報が掲載されていますので、このガイドライン以外にも参照すべき情報は多そうです。 

 


 

 

 






Just a Theory

JSONTree Module and Playground

I’m happy to announce the release of the JSONTree Go module and Wasm-powered in-browser playground.

As a follow-up to the JSONPath module and playground I released last month, I’m happy to announce the follow-up project, called JSONTree. I’ve implemented it in the github.com/theory/jsontree Go package, and built a Wasm-powered browser playground for it.

JSONTree?

While a RFC 9535 JSONPath query selects and returns an array of values from the end of a path expression, a JSONTree compiles multiple JSONPath queries into a single query that selects values from multiple path expressions. It returns results not as an array, but as a subset of the query input, preserving the paths for each selected value.

In other words, it compiles multiple paths into a single tree of selection paths, and preserves the tree structure of the input. Hence JSONTree.

Example

Consider this JSON:

{ "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 }, { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 }, { "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99 } ], "bicycle": { "color": "red", "price": 399 } } }

This JSONPath query:

$..price

Selects these values (playground):

[8.95, 12.99, 8.99, 22.99, 399]

While this JSONPath query:

$..author

Selects (playground):

[ "Nigel Rees", "Evelyn Waugh", "Herman Melville", "J. R. R. Tolkien" ]

JSONTree compiles these two JSONPaths into a single query that merges the author and price selectors into a single segment, which stringifies to a tree-style format (playground):

$ └── ..["author","price"]

This JSONTree returns the appropriate subset of the original JSON object (playground):

{ "store": { "book": [ { "author": "Nigel Rees", "price": 8.95 }, { "author": "Evelyn Waugh", "price": 12.99 }, { "author": "Herman Melville", "price": 8.99 }, { "author": "J. R. R. Tolkien", "price": 22.99 } ], "bicycle": { "price": 399 } } }

Note that the original data structure remains, but only for the subset of the structure selected by the JSONPath queries.

Use Cases

A couple of use cases drove the conception and design of JSONPath.

Permissions

Consider an application in which ACLs define permissions for groups of users to access specific branches or fields of JSON documents. When delivering a document, the app would:

Fetch the groups the user belongs to Convert the permissions from each into JSONPath queries Compile the JSONPath queries into an JSONTree query Select and return the permitted subset of the document to the user Selective Indexing

Consider a searchable document storage system. For large or complex documents, it may be infeasible or unnecessary to index the entire document for full-text search. To index a subset of the fields or branches, one would:

Define JSONPaths the fields or branches to index Compile the JSONPath queries into a JSONTree query Select and submit only the specified subset of each document to the indexing system Go Example

Use the github.com/theory/jsontree Go package together with github.com/theory/jsonpath to compile and execute JSONTree queries:

package main import ( "fmt" "github.com/theory/jsonpath" "github.com/theory/jsontree" ) func main() { // JSON as unmarshaled by encoding/json. value := map[string]any{ "name": "Barrack Obama", "years": "2009-2017", "emails": []any{ "potus@example.com", "barrack@example.net", }, } // Compile multiple JSONPaths into a JSONTree. tree := jsontree.New( jsonpath.MustParse("$.name"), jsonpath.MustParse("$.emails[1]"), ) // Select from the input value. js, err := json.Marshal(tree.Select(value)) if err != nil { log.Fatal(err) } fmt.Printf("%#v\n", tree.Select(value)) }

And the output:

{"emails":["barrack@example.net"],"name":"Barrack Obama"}

Note that the index position of the selected email was not preserved. Replace New with NewFixedModeTree to create a “fixed mode” JSONTree that preserves index positions by filling gaps with nulls. Its output of the above example would be:

{"emails":[null,"barrack@example.net"],"name":"Barrack Obama"} Status

The public interface of the jsontree module is quite minimal and stable. But I suspect there may remain some flaws in the merging of JSONPath selectors. Please report bugs via GitHub issues and I’ll get them fixed up ASAP.

Otherwise, please share and enjoy!

More about… Go JSONTree JSONPath Playground RFC 9535

Georg C. F. Greve

Self Sovereign Identity: Over before it started?

Web security, symbolized Monty Pythons parrot sketch is an all time classic because it plays on a very human experience of being defenseless when someone is just blatantly refusing to acknowledge the obvious. Shared reality is a matter of perception, not objective observation. Supported also by various mental biases, including the sunk cost fallacy, and the desire to agree with people we perceive a
Web security, symbolized

Monty Pythons parrot sketch is an all time classic because it plays on a very human experience of being defenseless when someone is just blatantly refusing to acknowledge the obvious. Shared reality is a matter of perception, not objective observation. Supported also by various mental biases, including the sunk cost fallacy, and the desire to agree with people we perceive as sympathetic or competent, virtually all humans can fall into this trap. Technical experts on Self Sovereign Identity included.

Instead of recognizing that the parrot of Web security is deceased, has gone to meet its maker, is pushing up the daisies, some people keep insisting that it is merely napping, and use trinkets and all kinds of strings and wires to hold it up.

The result is did:tdw, recently rebranded to did:webvh.

Web based DID methods belong to the family of federated identity methods, not Self Sovereign Identity

Using the web for Decentralized Identifiers (DIDs) violates some of the basic principles of Self Sovereign Identity, and effectively restricts the possible properties of the system to that of a classic federated identity protocol, such as OpenID.

Federated identity systems have their uses, and are often “good enough” for usage by large corporations and governments. But they also enable and encourage platform strategies, which has dramatic implications for personal usage, as well as Small and Medium Enterprises (SMEs). The result has been the Surveillance Industry, and a dependency of 95% of our economy on a few, large platform companies.

Self Sovereign Identity has been developed as a concept to break that dependency, and give people control over their own privacy, security and data. Instead, thanks to did:web and its descendants, it increasingly looks like an exercise of putting SSI lipstick on the pig of the federated Web.

You may think this is just hyperbole. So let’s go back to the beginning.

About the principles of SSI

The design goals of Decentralized Identifiers are listed in Section 1.2 of the W3C DID specificaton:

W3C DID: Design goals for Decentralized Identifiers (DID)

So how well do Web based DID methods meet these goals?

All web based methods, including did:web, did:tdw, did:webvh, and any other web based method anyone might ever come up with depend on a domain name pointing to a web server. The method specific identifier is always being transformed into a HTTPS request. The DID to HTTPS Transformation is the same for did:webvh as it is for did:web.

Reaching the correct web server is therefore contingent on access control by the administrator of the web server, the security of the web server, the longevity of the organization operating the web server, the Certificate Authority issuing the certificates identifying the web server, the configuration of the Transport Layer Security (TLS) parameters, and the Domain Name System to identify which web server to contact.

Users have two choices:

Operate their own web server, or Use the web server of some organization that provides them their “decentralized” identifier.

The former is the “let them eat cake” of modern technologies.

Despite many people working for decades to make self-hosting easier and more attractive, self-hosting has been declining. But even if we reverted that trend and enabled and motivated people to self-host with some amazing self-hosting offers: How hard would it be to correlate did:tdw:QmfGEUAcMpzo25kF2Rhn8L5FAXysfGnkzjwdKoNPi615XQ:petermueller.ch to did:tdw:QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n:petermueller.ch ?

How difficult would it be to figure out these might both belong to the same person, whose name might be Peter Müller? Especially considering that the web server at petermueller.ch presents a certificate that lists the owner of the certificate to be a “Peter Müller”, and the whois record for the domain lists his full name, address and phone number?

Which brings us to the second choice, above, which is today’s reality for most people in a federated identity world: Trust the platform intermediary.

How much decentralization is there in Apple Mail? How decentralized are today’s Certificate Authorities? How much privacy and control do users of Gmail have? How secure are today’s web services? How well does today’s world fare in terms of data protection from compromise and loss? How good is today’s Web security?

In reality, Web based DID methods give up on Decentralization, Control, Privacy and Security to the same level that today’s federated identity solutions have given up on them.

They use protocols like OpenID Connect for Verifiable Credentials and Verifiable Presentations (OIDC4VC & OIDC4VP) because they ARE OpenID methods. Which is why if use cases building on top of Web based DIDs were using truth in labelling, they would inform their users about being based on OpenID.

But much of the technology world thrives on buzzwords and hypes, and too often, the technical reality is obfuscated by layers of technical complexity and marketing. So the market rarely penalises false advertising.

did:web(vh), EV edition

Using the Web for “Decentralized” Identifiers and advertising it as revolutionary SSI technology is a bit like selling an “Electric Vehicle” that avoids all the complexities of battery development by using a diesel generator on a towed trailer to power the car. Yes, the propulsion is now electric.

But is the end result fundamentally better than a diesel car?

But what about the added security?

When reading about did:webvh, one could get the impression a lot of security is being added. In reality, it's mostly added complexity because everything goes over a single channel, the same one that is being used by did:web, as well.

It adds security in the same way that web sites get more secure if you ask users to enter not a single password, but three passwords, subsequently, in the correct order.

There is a reason no-one does that. Three passwords are not fundamentally more secure, because there is no additional channel. Add a real second factor, and security actually goes up. Which is why Multi Factor Authentication (MFA) has been invented.

Most likely the Web based DID methods can be developed to the point they will provide actual MFA security at a similar level to today’s federated identity protocols. Maybe did:webvh is even close to that point.

But that only makes it just as secure as “Login with Google”, today. And it does nothing to make it meet the SSI criteria of Decentralization, Control and Privacy.

Perhaps it is time to acknowledge that this parrot is not just a heavy sleeper.

Embrace, Extend, Extinguish

So what’s the problem if some people like did:web and its relatives? As long as we are aware of the limitations, and never use it for systems that are supposed to be used in production by end users or SMEs, there is nothing wrong with did:web.

As I’ve written in a previous article, it’s really useful for rapid prototyping, and can be used as a placeholder during experimentation before switching to a real Decentralized Identifier. We’ve done so ourselves when Vereign has been working on Proof of Concept for the Swiss health sector in 2023. But once we started working on the production system in 2024, we switched to an Autonomous Identifier (AID) that meets the definition of Self Sovereign Identity.

The problem starts when people put Web based identifiers into production.

Not only is it an issue of misleading users with false promises of decentralization, control, privacy and security. It runs much deeper than that. Increasing adoption of Web based identifiers under the moniker of Self Sovereign Identity makes it impossible for actual Self Sovereign Identity to differentiate itself from federated identity protocols. It sucks the air out of the room for actual SSI.

At a technology strategy level, adoption of Web based identifiers makes SSI susceptible to something it was originally designed to prevent: Platform capture.
Depiction of did:web(vh) being welcomed by Self Sovereign Identity community

Whether accidentally or by design, the movement for Web based identifiers perfectly executes a strategy coined by Microsoft in the 90s, labelled Embrace, Extend, Extinguish. I’ve gotten to study that particular script extensively when coordinating the technical and communication activities of the Free Software Foundation Europe around the EU Microsoft antitrust case in order to obtain much needed interoperability information for Samba.

The script is not super complicated. First, become a champion of Self Sovereign Identity, embrace it visibly, participate in the conferences, champion it at the political level. Then come up with ideas to extend it, for instance by proposing to speed up adoption by falling back on “proven”” technologies from the Web. Provided enough Kool-Aid, nobody might notice that it violates the principles of SSI and you’ll find many willing participants.

And lastly, once it has become the dominant flavour to however misleadingly claim the label Self Sovereign Identity, extinguish what is left in terms of actual SSI by aggressively using your economic and political might to push a platform play to suck the air out of the market. While Sovrin had its issues, including political, it undoubtedly lived up to all the SSI principles. Recently, the Sovrin Foundation announced that it was shutting down in March 2025 due to its community moving to the Web.

So, what’s left?

Microsoft had originally championed did:ion, a fully Self Sovereign Identifier based on the Sidetree specification. But as of 2023, it unsurprisingly also switched to did:web. Old habits die hard. Other large tech platforms are also pushing in the same direction, as are several of the former governmental monopolists with strong political ties, such as T-Systems.

The most promising design for a decentralized identifier is the Key Event Receipt Infrastructure (KERI), and at conceptual level it solves some very hard problems that no other method even attempts to address. The problem is how long it has been the promising next thing, without achieving sufficient adoption, and without finding its way into the regulatory documents in the European Union eIDAS (for “electronic IDentification, Authentication and trust Services”) working group, which is strongly pushing in the direction of Web based identifiers.

Unsurprisingly, technical experts have raised security and privacy concerns. In fact, it seems the current draft of the EU Architecture and Reference Framework (ARF) may be in violation of the EU privacy provisions it is supposed to provide.

Also, and it’s already been a topic in the DICE2024 retrospective, KERI is currently available in Python only. Which leaves adoption hamstrung. Not everyone in the KERI community agrees with that, but I’m aware of a number of people and initiatives who would love to adopt KERI, but not in Python. And its completeness as a concept puts the effort required for implementation in another language outside what is feasible for any of these parties individually.

So, when looking at the W3C DID Traits draft, the table looks pretty bleak, with two actual SSI methods left on it: did:key and did:peer. Both limited in relation to quite a few use cases.

What we ended up doing…

We anticipated this picture when designing our use case and solution for the Swiss health sector back in January 2024. The Web identifiers were obvious non-starters, as were did:key and did:peer, due to them being overly limited for our purpose.

We also did not like the idea of putting Python into a mission critical production application for large number of users. Especially since we did not want to put Python on the phone, and also did not want remote wallets that do not actually live on the phone.

So we did what XKCD told us not to do. Stay tuned.


IdM Laboratory

OpenID for Verifiable Credentials IssuanceのPublic Review期間が始まりました

こんにちは、富士榮です。 先日のOpenID for Verifiable Presentationにつづき、いよいよ始まりました。ついにOpenID for Verifiable Credential Issuanceも2nd Implementer's Draftです。 https://openid.net/public-review-period-for-proposed-second-implementers-draft-of-openid-for-verifiable-credential-issuance/ こんなスケジュールです。 Implementer's Draft public review period: Friday, December 20, 2024 to Sunday, February 2, 2025 (45 days) Imple

こんにちは、富士榮です。

先日のOpenID for Verifiable Presentationにつづき、いよいよ始まりました。ついにOpenID for Verifiable Credential Issuanceも2nd Implementer's Draftです。



https://openid.net/public-review-period-for-proposed-second-implementers-draft-of-openid-for-verifiable-credential-issuance/

こんなスケジュールです。

Implementer's Draft public review period: Friday, December 20, 2024 to Sunday, February 2, 2025 (45 days) Implementer's Draft vote announcement: Monday, January 20, 2025 Implementer's Draft early voting opens: Monday, January 27, 2025 Implementer's Draft official voting period: Monday, February 3 to Tuesday, February 10, 2025


いよいよVerifiable Credentialも社会実装に向けてラストスパートな感じがします。EUDIWも2026年には本格化するわけですし。

Saturday, 21. December 2024

IdM Laboratory

ついに発売へ。デジタルアイデンティティのすべて

こんにちは、富士榮です。 週末に家に帰ったら先行して届いていました。12月27日に発売になる「デジタルアイデンティティのすべて」です。 原著と比べると少しだけ大きいですね。 こちらから予約注文できますのでどうぞ。 https://amzn.to/3P9KS2e ついでにSoftware Designの最新号も届いていましたし、年末年始はアイデンティティとパスキーざんまいですね! 1月末には「パスキーのすべて」も発売されますので、体(頭)をあっためておきましょう。 https://amzn.to/3ZHQohg
こんにちは、富士榮です。
週末に家に帰ったら先行して届いていました。12月27日に発売になる「デジタルアイデンティティのすべて」です。 原著と比べると少しだけ大きいですね。

こちらから予約注文できますのでどうぞ。 https://amzn.to/3P9KS2e

ついでにSoftware Designの最新号も届いていましたし、年末年始はアイデンティティとパスキーざんまいですね!

1月末には「パスキーのすべて」も発売されますので、体(頭)をあっためておきましょう。 https://amzn.to/3ZHQohg

Friday, 20. December 2024

Heres Tom with the Weather

No Water is Death

“Extermination & Acts of Genocide”: Human Rights Watch on Israel Deliberately Depriving Gaza of Water AMY GOODMAN: So, can I ask you, Bill Van Esveld, is this the first time that Human Rights Watch is accusing Israel of genocide in Gaza? BILL VAN ESVELD: This is the first time that we’ve made a finding of genocidal acts in Gaza. It is not an accusation that we level lightly. We have no

“Extermination & Acts of Genocide”: Human Rights Watch on Israel Deliberately Depriving Gaza of Water

AMY GOODMAN: So, can I ask you, Bill Van Esveld, is this the first time that Human Rights Watch is accusing Israel of genocide in Gaza?

BILL VAN ESVELD: This is the first time that we’ve made a finding of genocidal acts in Gaza. It is not an accusation that we level lightly. We have not done this very often in our history. We accused the Myanmar military of genocidal acts against the Rohingya in 2017, and we found full-blown genocide against the Kurds in Saddam Hussein’s Anfal campaign in Iraq in the ’80s — sorry, in the ’90s, and we found genocide against — also in Rwanda in the ’80s. It is, you know, an extremely difficult crime to prove. It is, you know, mass killing deliberately to destroy people because they’re part of the group, not something we level lightly, but, yes, we found it here.


@_Nat Zone

OpenID Foundatiion の理事選挙(2025)に立候補しました

先程、OpenID Foundatiion の理事選挙(2025)に立候補いたしました。メンバーの各位におかれましては、ぜひ推薦 (second)お願いできればと思います。 選挙のページは https://openid.net/foundation/members/electio…

先程、OpenID Foundatiion の理事選挙(2025)に立候補いたしました。メンバーの各位におかれましては、ぜひ推薦 (second)お願いできればと思います。

選挙のページは https://openid.net/foundation/members/elections/61 です。

以下は、立候補にあたってのステートメントです。原文は英語ですが、日本語訳を載せておきます。

私は過去25年にわたってデジタルアイデンティティとプライバシーに深く関わってきました。OpenID Connect、JWT、JWS、OAuth PKCE、FAPIなど、多くの標準規格の共同著者でもあります。

私の一貫したテーマは「Power to the People(人々へ力を)」- デジタルアイデンティティによって人々に自己コントロールを取り戻す力を与えることです。

2008年にOpenID Foundation Japan(OIDF-J)を設立し、2011年からはOpenID Foundation(OIDF)の理事長を務めています。また、Open Identity Exchange(OIX)やKantara Initiativeの設立にも携わりました。日本の様々な政府委員会のメンバーを務め、ISO/IEC SC27「セキュリティ、サイバーセキュリティ、プライバシー」の日本国内委員会の委員長も務めています。また、IETF WG、特にOAuth WGにも貢献しています。現在はNAT Consultingの代表社員を務めています。

OpenID Foundationでの活動における主な成果は以下の通りです:

AB/Connect WGを立ち上げ、OpenID Connect Core 1.0および関連標準を作成 デジタル署名と暗号化スキームの作業を開始し、JWS、JWE、JWTとして結実 FAPI WGを立ち上げ、FAPI 1.0を作成。これは英国オープンバンキング、米国Financial Data Exchange、オーストラリアConsumer Data Standards、ブラジルオープンファイナンスなど、国際コミュニティに採用または推奨されました スウェーデンのウメオ大学とテストスイートの作業を開始し、これが後にOpenID認証プログラムとなりました。認証プログラムの採用はFAPIにより過去4年間で大きく加速し、現在1000以上の実装が認証されています 国際的にOpenID(R)商標を確保するなど、IPR体制を整理・合理化 人々がWGを立ち上げるためにOpenID Foundationに参加することを奨励・支援:アクティブなWGの数は13に増加し、幅広い業界ニーズに対応 対面ミーティング、カンファレンスでの講演、ブログ投稿、YouTubeチャンネルなどを通じてOpenID Connectと関連技術を国際的に普及させ、主流プロトコルとしました ISO、ITU-T、OECDなど他の国際機関との積極的な連携関係を開始し、OpenID Foundationにリエゾン委員会を設立 米国、欧州、日本、ラテンアメリカでOpenID関連イベントの開催を支援

アイデンティティ管理には新しいアーキテクチャアプローチが出現しています:特に、ウォレット中心のアプローチ、アイデンティティメタデータ交換、継続的認証とイベント共有が注目されています。OpenID Foundationはそのような環境に影響を与える仕様の準備に努めてきました。例えば:

OpenID for VPとSIOP v.2 OpenID Federation OpenID for Identity Assurance CAEPとRISC FAPI 2 AuthZEN IPSIE

これらはまだ完成していませんが、着実に進展しています。今後は、ワーキンググループの議長とワーキンググループを支援して、仕様の開発を加速させていく予定です。

同時に、アイデンティティ管理とAPI保護のベストプラクティスについて、新しい市場要件を探り、市場教育を続けていきます。これはGAINやDADEなどのコミュニティグループ活動にも見られます。

私のモットーは「Listen, Observe, Coordinate, and Be Proactive(聞く、観察する、調整する、そして先を見据えて行動する)」です。この分野の志を同じくする全ての人々と共に「オープンアイデンティティ」をさらに推進するため、皆様の投票をお願いいたします。共に力を合わせれば、世界に影響を与え、それを実現することができます。

Nat Sakimura
ブログ:https://nat.sakimura.org(英語)https://www.sakimura.org/(日本語)
Twitter:@_nat_en(英語)@_nat(日本語)
YouTube:https://www.youtube.com/@NatSakimura(英語)https://www.youtube.com/@55id(日本語)

Thursday, 19. December 2024

IdM Laboratory

モバイル運転免許証に関する用語を見ていきます

こんにちは、富士榮です。 こちらにも書いた通り、11月にAAMVAからMobile Drivers License Implementation Guidelineの1.4がでました。 https://idmlab.eidentity.jp/2024/12/mobile-drivers-licensemdl.html 読んでいてそういえば一般的じゃない言葉ばっかり使ってるよなぁ、と思うのでまずはTerminologyを見ておきましょう。 そもそも論のAAMVAです。 American Association of Motor Vehicle Administrators の略ですね。米国自動車管理者協会と訳されるようです。この辺の資料によると。  EDL。enhanced driver licenseの略ですね。日本語だと
こんにちは、富士榮です。
こちらにも書いた通り、11月にAAMVAからMobile Drivers License Implementation Guidelineの1.4がでました。 https://idmlab.eidentity.jp/2024/12/mobile-drivers-licensemdl.html

読んでいてそういえば一般的じゃない言葉ばっかり使ってるよなぁ、と思うのでまずはTerminologyを見ておきましょう。

そもそも論のAAMVAです。
American Association of Motor Vehicle Administrators

の略ですね。米国自動車管理者協会と訳されるようです。この辺の資料によると。 


EDL。enhanced driver licenseの略ですね。日本語だと強化運転免許証なんて訳されたりしますが、日本にいるとなんじゃそれ、ですがここに解説があります。

Enhanced Drivers Licenses (EDLs) are state-issued enhanced drivers licenses that provide proof of identity and U.S. citizenship when crossing the U.S. border in a vehicle. They are issued in a secure process, and include technology that makes travel easier. EDLs are a low-cost, convenient option for entering the United States from Canada, Mexico or the Caribbean through a land or sea port of entry, in addition to serving as a permit to drive.

強化運転免許証(EDLs)は、自動車で米国国境を越える際に身分証明と米国市民権を証明する州発行の強化運転免許証である。EDLは安全なプロセスで発行され、渡航を容易にする技術も含まれている。EDLは、カナダ、メキシコ、カリブ海諸国から陸路または海路で米国に入国する際に、低コストで便利なオプションであり、運転許可証としての役割も果たす。

使い道としては2025年から施行されるReal ID法(州が発行する運転免許証や身分証明書に対して最低限のセキュリティ基準を定めるもの)に対応したものっぽいです。米国国内で飛行機に乗るときにReal ID法に準拠した身分証明書の提示が必要になる、って話です。(日本人は外国政府発行のパスポートを使うことになると思います)

 

mDL。いわゆるMobile Driver's License、モバイル運転免許証ですね。

こんな解説が書いてあります。

driver’s license or identification card that resides on a mobile device or requires a mobile device as part of the process to gain access to the related information

Note to entry: Adapted from ISO/IEC 18013-5

運転免許証または身分証明書であって、モバイル・デバイス上に存在するもの、または入国時に 関連情報にアクセスするためのプロセスの一部としてモバイル・デバイスを必要とするもの: ISO/IEC 18013-5 からの引用。

まだ18013-7:2024と18013-5:2021の差分をとれていませんが、AAMVAとしては18013-5ベースです。


mDL app。いわゆるWalletに当たるものですね。

software running on an mDL holder’s device; within the context of this document this includes a standalone app as well as a wallet type app

mDL保持者のデバイス上で動作するソフトウェア。本書の文脈では、スタンドアロン型アプリおよびウォレット型アプリを含む。


mdoc。クレデンシャルフォーマットがmdoc、運転免許証として使えばmDLっていう整理でいいのかと思います。

document or application that resides on a mobile device or requires a mobile device as part of the process to gain access to the document or application

モバイル・デバイス上に存在する、または文書やアプリケーションにアクセスするためのプロセスの一部としてモバイル・デバイスを必要とする文書またはアプリケーション


mobile security object。MSOなんて言われたりします。mdocの構造化されたデータセットの話です。中にはデバイスアテステーションなども含まれるのでHolderバインディングの保証をすることが目的とされます。

structured data set that enables an mDL verifier to authenticate (for both accuracy and origin) other mDL data elements received during an mDL transaction

mDLベリファイアが、mDLトランザクション中に受信した他のmDLデータエレメントを(正確さと出所の両方について)認証できるようにする構造化データセット


provisioning。これは特殊用語lじゃないのかな?と思うのはIdentity界隈の人だからなのかもしれません。

initial loading of mDL information into an mDL app

mDLアプリへのmDL情報の初期読み込み

要するにウォレットへのモバイル運転免許証をインストールすることですね。



ということで、まずは用語解説からでした。

概念を理解するためにもこのあたりはちゃんと押さえておきましょう。 

 

 

 

 

 

 

Wednesday, 18. December 2024

IdM Laboratory

デジタルIDに関するグローバルの動向

こんにちは、富士榮です。 OpenID FoundationのブログでElizabethが各国のデジタルIDに関する最近のトピックスを取り上げていますので紹介したいと思います。もちろん日本も含まれています。 https://openid.net/digital-identity-news-round-up-13-dec-2024/ キプロス デジタル・シチズンとして知られるモバイル・デジタルIDアプリを開始した。 このアプリでは、バイオメトリクスIDカード、運転免許証、自動車の路上使用適格性証明書などのデジタル文書をモバイルで保持することができる。また、QRコードを使ってデジタル認証することもできる https://www.biometricupdate.com/202412/cyprus-launches-digital-citizen-mobile
こんにちは、富士榮です。
OpenID FoundationのブログでElizabethが各国のデジタルIDに関する最近のトピックスを取り上げていますので紹介したいと思います。もちろん日本も含まれています。 https://openid.net/digital-identity-news-round-up-13-dec-2024/


キプロス デジタル・シチズンとして知られるモバイル・デジタルIDアプリを開始した。 このアプリでは、バイオメトリクスIDカード、運転免許証、自動車の路上使用適格性証明書などのデジタル文書をモバイルで保持することができる。また、QRコードを使ってデジタル認証することもできる https://www.biometricupdate.com/202412/cyprus-launches-digital-citizen-mobile-digital-id-app ガーナ アクラのコトカ国際空港に生体認証国境管理システムを導入した。 バイオメトリクスはここでの鍵であり、eGatesシステムは、バイオメトリクス・ゲートで読み取られたバイオメトリクス国民IDカード(ガーナ・カード)を使用している https://www.biometricupdate.com/202412/ghana-unveils-biometric-border-management-system-e-gates-at-main-airport ニューメキシコ州 アップルまたはグーグルのウォレットに読み込むことができるモバイル運転免許証を導入する9番目の州となった。 ウォレットはここでの鍵であり、ニューメキシコ州民は運転免許証を携帯し、全米の特定のTSAチェックポイントで使用することができる。QRコードのスキャンによるデジタル認証が可能で、その後、暗号化されたデータがブルートゥース経由で送信される https://www.biometricupdate.com/202412/new-mexico-mdl-goes-live-amid-uneven-state-progress パプアニューギニア 国家デジタルID政策を発表し、公開協議を行っている。 ティモシー・マシウICT大臣によると、この政策は、金融包摂を促進するため、銀行口座開設を主なユースケースとして、SevisPassとして知られる公式デジタルIDシステムを確立するものである https://www.thenational.com.pg/digital-id-policy-released/ スイス Swiyuとして知られるウォレットに保持される国民デジタルIDの技術的実装計画を概説した。 第一段階の実装は2025年第1四半期にテストされる予定で、個々のコンポーネントのソースコードはオープンソースで公開される。第2段階のソリューションには、eIDから個人への追跡を防ぐため、より厳しいプライバシー要件が盛り込まれる予定であり、政府はこれを開発するための研究に110万米ドルを割り当てている https://www.biometricupdate.com/202412/swiss-e-id-has-an-official-name-technical-implementation-plan ナイジェリア オープンソースの MOSIP プラットフォームに支えられた新しい NIMS 2.0 デジタル ID システムのシステムインテグレーターの調達通知を出した バイオメトリクスもこの通知の一部であり、SIはMOSIPをABISソリューションやバイオメトリクス登録キットと統合するよう求めている。ナイジェリアの現在のIDインフラからのレガシーデータも移行する必要がある https://ted.europa.eu/en/notice/-/detail/753536-2024 エア・カナダ バンクーバー国際空港を出発する旅行者向けにデジタル ID プログラムを開始し、 モントリオール、オタワ、カルガリー、トロント、ビクトリア、エドモントンがこれに続く予定である このサービスでは、ゲートで顔認証を使って旅行者を確認するため、物理的な搭乗券や政府発行のIDを提示する必要がない https://www.travelandtourworld.com/news/article/canadian-travelers-to-benefit-as-air-canada-launches-digital-id-at-vancouver-airport-for-domestic-flights-including-to-montreal-ottawa-calgary-toronto-victoria-and-edmonton-new-travel-updates-you/ 英国 国の法執行機関は、最大2000万ポンド相当のライブ顔認証(LFR)システムの入札公告を出した このシステムでは、ライブカメラの映像を監視リストと照合し、要注意人物を特定する。市民権団体や議員の反対にもかかわらず、英国政府は犯罪撲滅の手段としてLFRを警察が使用することを支持し続けている https://www.biometricupdate.com/202412/uk-govt-publishes-25m-tender-for-live-facial-recognition ブラジル 11月29日(金)、ブラジルのPixデジタル決済システムは、1日で2億3,990万件の取引という新記録を達成した https://x.com/BancoCentralBR/status/1864038353248591895 ブラジル中央銀行は、この規模が公共デジタルインフラとしてのPixの役割を実証していると指摘している 中央銀行の調査によると、ブラジル国民の76.4%がPixを利用しており、回答者の46%が最も一般的な支払い方法としている https://www.infomoney.com.br/minhas-financas/pesquisa-do-bc-mostra-que-pix-superou-dinheiro-como-forma-de-pagamento-mais-usada/?utm_term=Autofeed&utm_medium=Social&utm_source=Twitter&Echobox=1733325955 日本 健康保険証の発行を中止し、マイナンバー・デジタルIDに置き換えた システムの不具合やプライバシーへの懸念から、日本ではこれまで導入が進んでいなかった https://www.biometricupdate.com/202412/japans-my-number-id-officially-replaces-health-insurance-cards パプアニューギニア オーストラリアに続いて「特定のソーシャルメディア・プラットフォーム」の年齢保証を法制化する計画を発表した 政府のデジタルトランスフォーメーション・リーダーであるスティーブン・マタイナホ氏は、「詐欺、違法な商品の流通、人身売買、偽情報、サイバーハラスメントの増加が懸念されている」ため、「有害なコンテンツから子どもを守る」ためだと主張している 大人も「年齢制限のあるコンテンツ」にアクセスする際には、強制的なデジタルID(SevisPassとして知られる)を使用する必要がある https://www.biometricupdate.com/202412/papua-new-guinea-to-ban-social-media-for-youth-require-age-verification-for-adults フランス 大手携帯電話会社4社(ブイグ・テレコム、フリー、オレンジ、SFR)は、オンラインビジネスのためのデジタルID認証を改善するために手を組んだ。 ここでは相互運用性が重要であり、事業者はモバイルネットワーク間の仕様を統一するために2つの新しいAPIを導入している。これらは、Linux Foundationによって開発されたオープンソースプロジェクトであるCAMARA標準に基づいている https://www.biometricupdate.com/202412/frances-mobile-operators-tackle-online-fraud-with-digital-identity-protections 英国 英国内務省は、英国への入国を申請する外国人を対象に、スマートフォンを使った遠隔および対面での生体指紋採取の試験実施を計画している しかし、パスポートの生体指紋データは現在、拡張アクセス制御(EAC)によって保護されており、EU加盟国の当局しか読み取ることができないことを考えると、この計画の実現性には懸念がある 一方、遠隔地からの指紋採取は、AIを利用した詐欺の影響を受けやすいというセキュリティ上の懸念もある https://www.biometricupdate.com/202412/uk-home-office-to-test-remote-fingerprint-enrolment-via-smartphone-for-entry ケンブリッジ・オルタナティブ・ファイナンス・センター(CCAF) 新しい調査によると、60の国・地域がオープン・バンキングに関連する法律や規制を導入している。 このうち44の法域では、金融サービス業界内の競争が導入の主な要因となっている また、オープン・バンキングのアプローチには地域差があり、欧州、中央アジア、中東、北アフリカでは規制主導のアプローチが主流である一方、サハラ以南のアフリカやアジア太平洋地域では市場主導のアプローチが一般的である https://www.jbs.cam.ac.uk/faculty-research/centres/alternative-finance/publications/the-global-state-of-open-banking-and-open-finance-report/
他にもイベントのお知らせとしてデジタルIDのための新興APAC市場のナビゲートというWebinarが案内されています。 https://x.com/BiometricUpdate/status/1864150904766603322

しかし、本当に動いた一年でしたね。

@_Nat Zone

JIPDEC、トラステッド・サービス登録(電子契約サービス)の登録基準を作成し、公開

わたしも客員研究員を努めさせていただいているJIPDECでは、電子契約サービスの信頼性向上のため、「JIPDECトラステッド・サービス登録(電子契約サービス)」の登録基準を作成し、公開いたしました。 本基準は、電子契約サービスの安全性確保に必要な項目を定めており、安心して電子契約…

わたしも客員研究員を努めさせていただいているJIPDECでは、電子契約サービスの信頼性向上のため、「JIPDECトラステッド・サービス登録(電子契約サービス)」の登録基準を作成し、公開いたしました。

本基準は、電子契約サービスの安全性確保に必要な項目を定めており、安心して電子契約サービスを選定・利用できる環境づくりに貢献します。

詳細については、以下のJIPDECのウェブサイトをご確認ください。

電子契約サービスの登録基準の公開
https://www.jipdec.or.jp/project/jtsr/e-contract.html

電子契約サービスの登録基準の公開プレスリリース
https://www.jipdec.or.jp/news/pressrelease/20241217.html?channel=main

以下、Otio によるまとめです

JIPDECトラステッド・サービス登録(電子契約サービス)概要 電子契約サービスは、電子署名やeシール、タイムスタンプを用いて電子文書を保存する。 「固有性」が重要で、利用者の指示に基づく固有の行為を証明。 JIPDECは電子署名のプロセスを厳格に評価し、第三者のなりすましを防ぐ仕組みを重視。 安全で効率的な契約締結を可能にする。 登録範囲 評価対象は、リモート署名機能、ユーザー管理機能、プラットフォーム・運用。 すべての対象に固有性に関する観点が含まれる。 登録のための審査要件 運用基準: 利用者の適正管理や運用体制、電子文書管理の要件。 技術基準: 利用者認証、署名値生成、ネットワークセキュリティ対策の要件。 設備基準: アクセス制御、侵入防止、災害対策の要件。 申請から登録までの流れ 申請書の提出(お客様) 必要書類の案内(JIPDEC) 書類の準備(お客様) 書類の送付(お客様) 書類審査(JIPDEC) 現地審査(JIPDEC) 登録の可否決定(JIPDEC) 登録完了と登録証の発行(JIPDEC)

IdM Laboratory

FAPI2.0の最終化に向けたPublic Reviewが始まります

こんにちは、富士榮です。 FAPI2.0のSecurity Profile and Attacker Modelに関する仕様の最終化に関するPublic Review期間が始まっていますね。 https://openid.net/public-review-for-proposed-final-fapi-2-0-specifications/ 今後はこんなスケジュールで進むようです。 Final Specification public review period: Monday, December 9, 2024 to Friday, February 7, 2025 (60 days) Final Specification vote announcement: Saturday, January 25, 2025 Final Specification e

こんにちは、富士榮です。

FAPI2.0のSecurity Profile and Attacker Modelに関する仕様の最終化に関するPublic Review期間が始まっていますね。

https://openid.net/public-review-for-proposed-final-fapi-2-0-specifications/



今後はこんなスケジュールで進むようです。

Final Specification public review period: Monday, December 9, 2024 to Friday, February 7, 2025 (60 days) Final Specification vote announcement: Saturday, January 25, 2025 Final Specification early voting opens: Saturday, February 1, 2025 Final Specification voting period: Saturday, February 8, 2024 to Saturday, February 15, 2025 (7 days)


いよいよFAPIも本格化ですね。

Monday, 16. December 2024

IdM Laboratory

Taiwan Digital Identity Wallet International Forumでの登壇内容を紹介します

こんにちは、富士榮です。 先週はTaiwan Digital Identity Wallet International Forumで登壇してきましたので、キーノートとしてお話した内容をメモしておきたいと思います。 イベントについてはこちら https://idmlab.eidentity.jp/2024/11/taiwan-digital-wallet-international.html 自己紹介は置いておいて、テーマは相互運用性でした。 As you know, the Digital Identity Wallet has recently become an emerging topic in the digital identity space. For example, the European Committee has started im
こんにちは、富士榮です。
先週はTaiwan Digital Identity Wallet International Forumで登壇してきましたので、キーノートとしてお話した内容をメモしておきたいと思います。 イベントについてはこちら https://idmlab.eidentity.jp/2024/11/taiwan-digital-wallet-international.html

自己紹介は置いておいて、テーマは相互運用性でした。
As you know, the Digital Identity Wallet has recently become an emerging topic in the digital identity space. For example, the European Committee has started implementing the European Digital Identity Wallet, which allows citizens to bring their own digital identity documents, such as national ID cards or mobile driver's licenses. At the same time, interoperability is essential for adopting these wallets in the real world because we have an existing ecosystem without the digital identity wallet today. So, today’s my talk is about interoperability between current identity ecosystems and a Digital Identity Wallet.

ご存知のように、デジタルIDウォレットは最近、デジタルID分野で新たなトピックとなっています。例えば、欧州委員会は欧州デジタルIDウォレットの導入を開始しました。これにより、国民は国民IDカードや携帯電話運転免許証などのデジタルID文書を携帯できるようになります。同時に、現実世界でこれらのウォレットを採用するには相互運用性が不可欠です。なぜなら、今日、デジタルIDウォレットのない既存のエコシステムが存在しているからです。

そこで、本日の私の講演では、現在のアイデンティティ・エコシステムとデジタル・アイデンティティ・ウォレット間の相互運用性についてお話します。 


First, let’s think about our current situation when considering the term “interoperability.” Since the fall of the Tower of Babel, we have been living in a world divided by different languages, different tribes, different cultures, and different social systems. In other words, we have been living in a world where we have not been able to communicate well for a long time. This continued until the Age of Exploration, when trade between countries worldwide became more active. For people like me who have lived in Asia, we have lived in a world that is very different from Western languages and cultures, and we are still living behind language barriers. However, since the spread of the Internet began in the 1990s, the breakdown of regional divisions, including countries, has started. We have finally been freed from the constraints of physical location, and the need to communicate globally has arisen. So, did a technology break down these barriers to allow us to communicate and trade freely globally?

まず、「相互運用性」という言葉について考える前に、現在の状況について考えてみましょう。

バベルの塔が崩壊して以来、私たちは異なる言語、異なる部族、異なる文化、異なる社会制度によって分断された世界に生きてきました。

つまり、私たちは長い間、うまくコミュニケーションを取ることができない世界に生きてきたのです。この状況は、大航海時代を迎え、世界各国間の貿易が活発になるまで続きました。

私のようにアジアで生活してきた人間にとっては、西洋の言語や文化とはまったく異なる世界で生きてきましたし、今でも言葉の壁に阻まれて生活しています。

しかし、1990年代からインターネットが普及し始め、国を含めた地域的な区分が崩れ始めました。私たちはようやく物理的な場所の制約から解放され、グローバルにコミュニケーションを取る必要性が生じてきたのです。

では、こうした障壁を打破し、世界中で自由にコミュニケーションや取引ができるようになった技術は登場したのでしょうか?



At the moment, the answer is no. We are currently living in a world divided by silos created by technology. Even now, to transfer data freely across systems, we have to design and implement interfaces between systems each time, and even when it comes to identity, which is the theme of today's talk, it is still managed on a system-by-system basis. We often have to manage multiple accounts for each systems.

現時点では、答えはノーです。

私たちは現在、テクノロジーによって作られたサイロによって分断された世界に生きています。

今でも、システム間でデータを自由にやりとりするためには、その都度、システム間のインターフェースを設計し実装しなければなりませんし、本日のテーマであるアイデンティティにしても、システムごとに管理されています。 システムごとに複数のアカウントを管理しなければならないこともよくあります。 



We need a way to communicate across countries, jurisdictions, and systems. And we already know of some examples that have been developed to some extent. Email can be delivered anywhere in the world without a centralized system, and the telephone system allows us to make calls to people worldwide. In these systems, we can communicate without depending on the email user agent or telephone type. Also, in the real world, we use passport to identify people on traveling to other countries. Those of us involved in digital identity need to follow the example of these previous cases and work to create a world where interoperability is guaranteed. 国や管轄区域、システムを越えてコミュニケーションを行う方法が必要です。 そして、ある程度まで開発された例がすでにいくつか存在しています。 電子メールは中央集権的なシステムなしで世界中のどこへでも配信できますし、電話システムは世界中の人々との通話を可能にしています。これらのシステムでは、電子メールユーザーエージェントや電話の種類に依存することなくコミュニケーションを行うことができます。 また現実の世界では、パスポートを使って他国への渡航者の身元確認を行っています。 デジタルアイデンティティに関わる私たちは、これらの過去の事例を手本とし、相互運用性が保証された世界を実現するために取り組む必要があります。



And digital identities are not just for natural persons. There are various things in the real world, such as IoT devices and legal entities, are connected to the internet, and daily business transactions are carried out. Now is the time to design and implement a system so that all digital identities can be mutually operated with minimal friction.

また、デジタルアイデンティティは自然人だけのものではありません。現実世界には、IoTデバイスや法人など、さまざまなものがインターネットに接続され、日常的な商取引が行われています。今こそ、すべてのデジタルアイデンティティが相互に最小限の摩擦で運用できるようなシステムの設計と実装を行うべき時なのです。



 Let's now take a closer look at interoperability. Even though we use the word 'interoperability,' it can be roughly divided into technical and non-technical aspects. When many engineers talk about interoperability, they often only focus on the technical side, but it is also essential to consider the non-technical side.

First, let's look at the technical aspects. We must consider the identifier format, transfer protocol, and data model, including the schema and signature algorithm.

In addition, on the non-technical side, we need to agree on the semantics that expresses what meaning the exchanged data has, the rules and framework within which the data is generated, and the trust framework that ensures the reliability of the entity state, etc.

Let's take a closer look at each of these elements from the next slide.

それでは、相互運用性について詳しく見ていきましょう。相互運用性という言葉を使っていますが、大まかに技術的な側面と技術的ではない側面に分けることができます。多くの技術者が相互運用性について語る場合、技術的な側面のみに焦点を当てがちですが、技術的ではない側面も考慮することが不可欠です。

まず、技術的な側面について見ていきましょう。識別子のフォーマット、転送プロトコル、データモデル(スキーマや署名アルゴリズムを含む)を考慮する必要があります。

さらに、技術面以外の側面では、交換されたデータがどのような意味を持つのか、データが生成されるルールや枠組み、エンティティの状態の信頼性を確保する信頼フレームワークなどを表現するセマンティクスについて合意する必要があります。

それでは、これらの要素について、次のスライドから詳しく見ていきましょう。 



First of all, let's talk about identifiers. An identifier is an attribute identifying a particular entity within a specific set. This attribute can be a single attribute or multiple attributes.

The design of the identifier depends on the size of the set that contains the target entity. For example, designing an identifier within a local set differs significantly from creating one within an international or global set. For example, my family name is Fujie, but there may be no one else in this room with the same family name. In this situation, my family name could function as an identifier. However, when I go home to Japan, my family name does not function as an identifier because, as you know, all of my family members have the family name Fujie.

Finally, it is essential to consider privacy and persistence when considering identifiers. For example, suppose control of an identifier is taken away from you. In that case, there is a possibility that control over the identity information linked to that identifier will also be taken away from you. Also, suppose you are logged in to multiple services using the same identifier. In that case, there is a possibility that the services will collide with each other and merge your attribute information in an unintended way. To deal with such cases, it may be necessary to devise ways to ensure that users use different identifiers.

On the other hand, if users are not allowed to use the same identifier for an extended period, they may not be able to use the service continuously or may not be able to access past data.

From the perspective of interoperability, it is necessary to design systems that can correctly identify entities while considering privacy and persistence, not only in the current but also in a broader set in the future.

Identifiers may seem simple, but they must be designed very carefully.

 まず、識別子についてお話しましょう。識別子とは、特定の集合内の特定のエンティティを識別する属性です。この属性は単一の属性であることも、複数の属性であることもあります。

識別子の設計は、対象のエンティティを含む集合の規模によって異なります。例えば、ローカルな集合内で識別子を設計することは、国際的またはグローバルな集合内で設計することとは大きく異なります。例えば、私の姓は富士榮ですが、この部屋には同じ姓の人は誰もいないかもしれません。このような状況では、私の姓は識別子として機能するでしょう。しかし、私が日本に帰国した場合、ご存知のように私の家族全員が富士榮という姓なので、私の姓は識別子として機能しません。

最後に、識別子を考える際には、プライバシーと永続性について考慮することが不可欠です。例えば、ある識別子の管理が自分から奪われたとします。その場合、その識別子と紐づけられたID情報についても管理が奪われる可能性があります。また、同じ識別子を使って複数のサービスにログインしているとします。その場合、サービス同士が衝突し、意図しない形で属性情報がマージされてしまう可能性がある。このようなケースに対応するためには、ユーザーに異なる識別子を利用させる工夫が必要となる可能性があります。

一方で、長期間にわたって同一の識別子を利用できないと、サービスを継続的に利用できなくなったり、過去のデータにアクセスできなくなったりする可能性があります。

相互運用性の観点では、プライバシーや永続性を考慮しつつ、現在だけでなく将来にわたって、エンティティを正しく識別できる仕組みを設計する必要があります。

識別子は一見単純に見えるが、非常に慎重に設計しなければいけません。


 

Next, we will consider transport protocols. Transport protocols define the methods by which entities communicate with each other. In the context of digital credentials, transport protocols include issuing credentials to wallets, presenting credentials to verifiers, and revoking issued credentials by issuers. To ensure interoperability, the multiple issuer, wallet, and verifier components must communicate using a method that has been agreed upon in advance. 次に、トランスポートプロトコルについて検討します。トランスポートプロトコルは、エンティティが相互に通信する方法を定義します。デジタルクレデンシャルの文脈では、トランスポートプロトコルには、クレデンシャルをウォレットに発行すること、クレデンシャルをベリファイアに提示すること、発行者によって発行されたクレデンシャルを取り消すことが含まれます。 相互運用性を確保するには、複数の発行者、ウォレット、ベリファイアのコンポーネントが、事前に合意された方法で通信する必要があります。



Let's also consider data models. Schemas need to take into account the types and namespaces of attributes. Generally, gender is expressed using letters such as M and F, but in some cases, it is expressed using numbers such as 0 and 1. In addition, the attribute name family_name is sometimes used to express the family name, and the attribute name surname is sometimes used. In any case, related entities must agree on the names and types of attributes to achieve interoperability.

The algorithm used for digital signatures is also a very important factor. In general, it is necessary to verify digital signatures to verify the authenticity of digital credentials. Still, verification will not be possible if the issuer uses a signature algorithm that differs from what the verifier expects. Agreement on the signature algorithm is significant to avoid this.

データモデルについても検討してみましょう。スキーマでは、属性のタイプと名前空間を考慮する必要があります。一般的に、性別はMやFなどの文字で表現されますが、場合によっては0や1などの数字で表現されることもあります。また、姓を表現する際に、属性名family_nameが使用されることもあれば、surnameという属性名が使用されることもあります。いずれにしても、相互運用性を実現するには、関連するエンティティが属性の名称とタイプについて合意する必要があります。

電子署名に使用されるアルゴリズムも非常に重要な要素です。一般的に、電子証明書の真正性を検証するには、電子署名を検証する必要があります。しかし、発行者が検証者が期待するものと異なる署名アルゴリズムを使用している場合、検証は不可能です。これを回避するには、署名アルゴリズムについて合意することが重要です。 



As we have seen, reaching an agreement on identifiers, transport protocols, and data models is essential to achieve interoperability.

Many standardization organizations are working to develop standard specifications to facilitate this agreement. For example, the W3C has developed a specification called Decentralized Identifiers for identifiers, and the OpenID Foundation has developed a protocol for exchanging credentials called the OpenID for Verifiable Credenitals Issuance and the OpenID for Verifiable Presentations. The W3C and IETF have also formed working groups to create data models.

However, as you can see from this table, the current situation is that multiple standardization bodies are trying to develop their standard specifications. In this situation, no matter how much implementers adopt a standard, achieving interoperability with entities that use a different standard will not be possible.

これまで見てきたように、識別子、通信プロトコル、データモデルについて合意に達することは、相互運用性を実現するために不可欠です。 多くの標準化団体が、この合意を促進するための標準仕様策定に取り組んでいます。例えば、W3Cは識別子としてDecentralized Identifiersと呼ばれる仕様を策定しており、OpenID FoundationはOpenID for Verifiable Credenitals IssuanceおよびOpenID for Verifiable Presentationsと呼ばれる認証情報の交換プロトコルを策定しています。また、W3CやIETFでもデータモデルのワーキンググループが結成されています。 しかし、この表から分かるように、現状では複数の標準化団体が標準仕様を策定しようとしている状況です。このような状況では、実装者がどれだけ標準を採用しても、異なる標準を採用する主体との相互運用性を実現することはできません。



Due to the situation explained in the previous slide, some people are defining and using profiles that combine multiple standards.

It is not realistic to reach agreement on the identifiers, transfer protocols, and data models for each entity. Therefore, we develop profiles that combine specifications for specific identifiers, specific transfer protocols, and specific data models, and the relevant entities agree to use these profiles.

This allows us to reduce the need for individual coordination between entities.

This approach is also used in the European Union, and the OpenID Foundation provides a profile called the High Assurance Interoperability Profile, or HAIP.

前スライドで説明した状況により、複数の標準を組み合わせたプロファイルを定義し使用する人もいます。

各エンティティの識別子、転送プロトコル、データモデルについて合意に達することは現実的ではありません。そのため、特定の識別子、特定の転送プロトコル、特定のデータモデルの仕様を組み合わせたプロファイルを開発し、関連するエンティティがこれらのプロファイルの使用に同意します。

これにより、エンティティ間の個別の調整の必要性を減らすことができます。

このアプローチは欧州連合でも採用されており、OpenIDファウンデーションは、高信頼相互運用性プロファイル(HAIP)と呼ばれるプロファイルを提供しています。 



From this slide, I would like to consider the non-technology elements.

First of all, there is semantics. Suppose you receive a digitally signed credential. If you can only verify the signature, can you trust the information contained in the credential? I think it is difficult.

In other words, a digital signature only proves that the data has not been tampered with by a third party, and does not prove the reliability of the data itself or the reliability of the entity that sent it.

This is where a quality assurance framework is needed. For example, UNESCO has published a quality assurance framework that is intended for global use. This framework defines the levels of degrees at universities, etc., and by having educational institutions in each country issue degrees in accordance with this framework, the recipients of the credentials will be able to understand the meaning of the credentials.

このスライドから、技術以外の要素について考えてみたいと思います。

まず、意味論があります。 デジタル署名された資格証明書を受け取ったとします。 署名の検証しかできない場合、その資格証明書に記載されている情報を信頼できるでしょうか? 難しいと思います。

つまり、デジタル署名は、第三者がデータを改ざんしていないことを証明するだけであり、データ自体の信頼性や、送信元の信頼性を証明するものではありません。

そこで必要になるのが、品質保証の枠組みです。例えば、ユネスコは世界的に利用できる品質保証の枠組みを公表しています。この枠組みは、大学などの学位のレベルを定義するもので、各国の教育機関がこの枠組みに沿って学位を発行することで、資格取得者はその資格の意味を理解できるようになります。


 

Next, let's consider the trust framework. Let's ask the same question as on the previous page. Just because you have verified the digital signature on the credential you have received, does that mean you can trust the issuer of that credential? For example, if you have obtained the digital data of a graduation certificate with a digital signature, how can you confirm that the university that issued the certificate exists?

This is where a system called a trust framework comes into play. There are various types of trust frameworks, but general laws and regulations are also a type of trust framework. For example, the recipient of a certificate of qualification may believe that the issuer is operating under the country's laws and regulations that control the bank and that the government regularly audits the bank. In this case, the verifier believes in the laws and regulations of the country, so there is no need to visit the bank to confirm that the individual issuer is an actual bank. In this way, it is possible to reduce the cost of individual verification by designing and operating a system that includes certification and auditing.

次に、トラストフレームワークについて考えてみましょう。前ページと同じ質問をしてみましょう。受け取ったクレデンシャルに付与された電子署名を検証したからといって、そのクレデンシャルの発行者を信頼できるのでしょうか?例えば、電子署名の付与された卒業証明書の電子データを受け取った場合、その証明書を発行した大学が実在していることをどのように確認できるのでしょうか?

そこで登場するのが「トラストフレームワーク」と呼ばれる仕組みです。トラストフレームワークにはさまざまな種類がありますが、一般的な法律や規則もトラストフレームワークの一種です。例えば、資格証明書の受領者は、発行者が銀行を管理する国の法律や規則に従って運営されており、政府が定期的に銀行を監査していると考えるかもしれません。この場合、検証者はその国の法律や規制を信頼しているため、個々の発行者が実際に銀行であることを確認するために銀行を訪問する必要はありません。このように、認証と監査を含むシステムを設計・運用することで、個々の検証にかかるコストを削減することが可能となります。 



In a few previous pages, we discussed the need for profiles. At that time, we focused on the technical aspects but also learned about the importance of trust frameworks on the previous page. That's right, profiles can include not only technological elements but also agreements on trust frameworks.

Because so many factors are involved in ensuring interoperability, using profiles that organize and correctly combine technical and non-technical aspects is efficient and effective.

数ページ前に、プロファイルの必要性について述べました。その際には技術的な側面に焦点を当てましたが、前ページでは信頼フレームワークの重要性についても学びました。その通り、プロファイルには技術的な要素だけでなく、信頼フレームワークに関する合意事項も含めることができます。 相互運用性を確保するには多くの要因が関わっているため、技術的および非技術的な側面を整理し、正しく組み合わせたプロファイルを使用することが効率的かつ効果的です。



As system architectures change daily, it is clear that systems based on multiple approaches will coexist. In the real world, we must consider interoperability between these systems.

In this slide, I want to explain the recent paradigm shift in digital identity systems.

This diagram shows how the identity paradigm has changed from a centralized world to a decentralized one.

In the centralized identity system, as I mentioned earlier, it is crucial to manage identity information in the centralized database. However, there are various side effects, such as the need to keep a non-active user account in the database, making license costs expensive. It may cause identity theft attack because nonactive user cannot be aware their identities were stolen since they are not using their accounts.

Also, a centralized authentication system is quite helpful in gathering sign-in logs. Still, the system's availability is quite crucial because if the system fails, all users cannot log in to all applications.

On the other hand, in the decentralized identity world, users' identity data is stored in the user's wallet, which is typically installed on smartphones. So, users can bring their identity and authenticate it through their purse, and there is no effect on other users if the user’s wallet is offline.

In addition, users can aggregate attributes from multiple data sources in a single wallet, aggregate them, and present them to the application. The application can get various attributes from the user’s wallet and determine access permission.

システムアーキテクチャは日々変化しており、複数のアプローチに基づくシステムが共存することは明らかです。現実の世界では、これらのシステム間の相互運用性を考慮する必要があります。 このスライドでは、デジタルIDシステムにおける最近のパラダイムシフトについて説明したいと思います。 この図は、IDのパラダイムが中央集権型から分散型へとどのように変化したかを示しています。 集中型のIDシステムでは、先ほど申し上げたように、ID情報を集中データベースで管理することが重要です。しかし、さまざまな副作用があります。例えば、データベースに非アクティブなユーザーアカウントを維持する必要があるため、ライセンスコストが高額になることがあります。また、非アクティブなユーザーはアカウントを使用していないため、自分のIDが盗まれたことに気づくことができません。そのため、ID盗難の被害に遭う可能性があります。 また、中央集権型の認証システムはサインインログの収集に非常に役立ちます。しかし、システムが故障した場合、すべてのユーザーがすべてのアプリケーションにログインできなくなるため、システムの可用性は非常に重要です。 一方、分散型のアイデンティティの世界では、ユーザーのアイデンティティデータは、通常スマートフォンにインストールされているユーザーの財布に保存されます。そのため、ユーザーは自分のアイデンティティを持ち歩き、財布を通して認証することができます。また、ユーザーの財布がオフラインの状態でも、他のユーザーには影響がありません。 さらに、ユーザーは複数のデータソースから属性を収集し、それを集約してアプリケーションに提示することができます。アプリケーションはユーザーの財布からさまざまな属性を取得し、アクセス許可を決定することができます。



We at the OpenID Foundation support the SIDI Hub, a community established to ensure interoperability in global digital identity. The SIDI Hub is considering ensuring interoperability in a world where various system architectures coexist from multiple perspectives, including systems and governance.

We have defined three types of system architecture: federated, wallet-based, and API-based, and we are considering what methods might be used to connect systems that use each of these architectures. For example, we are researching the possibility of building a proxy module between an API-based identity provider and a federated relying party.

私たちOpenIDファウンデーションは、グローバルなデジタルアイデンティティの相互運用性を確保するために設立されたコミュニティであるSIDI Hubを支援しています。SIDI Hubでは、システムやガバナンスなど、さまざまな観点から、さまざまなシステムアーキテクチャが共存する世界における相互運用性の確保について検討しています。

私たちは、システムアーキテクチャをフェデレーション型、ウォレット型、API型の3つに定義し、それぞれのアーキテクチャを使用するシステムを接続する方法について検討しています。例えば、API型アイデンティティプロバイダーとフェデレーション型依存者の間にプロキシモジュールを構築する可能性について研究しています。



Let's take a brief look at federation-type identity systems.

This type of architecture is the mainstream of current identity systems; for example, Apple, Google, Microsoft, and LINE also use this method.

In this system, applications are configured in a way that relies on external identity systems, and by clicking on buttons such as “Sign in with Apple” or “Sign in with Google,” users are redirected to the Apple or Google identity system. After that, the results of the user being authenticated by Apple or Google are presented to the application, and the login is complete.

This system is very well standardized, and protocols such as SAML and OpenID Connect are the mainstream and are adopted worldwide.

フェデレーション型のIDシステムについて簡単に説明します。

このタイプのアーキテクチャは、現在のIDシステムの主流であり、例えばApple、Google、Microsoft、LINEなどもこの方式を採用しています。

このシステムでは、アプリケーションは外部のIDシステムに依存する形で構成され、「Appleでサインイン」や「Googleでサインイン」などのボタンをクリックすると、ユーザーはAppleやGoogleのIDシステムにリダイレクトされます。その後、Apple または Google によるユーザー認証の結果がアプリケーションに表示され、ログインが完了します。

このシステムは非常に標準化されており、SAML や OpenID Connect などのプロトコルが主流となっており、世界中で採用されています。


 

In the wallet-based model, users store their own identities in software called a wallet and carry it with them.

This model is sometimes called the Issuer-Holder-Verifier (IHV) model, as it contains three components: the Issuer, which issues credentials; the Holder, which holds credentials; and the Verifier, which verifies credentials.

As I mentioned in the previous slide about paradigm shifts, this model is expected to support new use cases. For example, because Holders do not need to contact Issuers when presenting credentials to Verifiers, it will be possible to support new use cases, such as offline cases.

However, there are many competing standards, and the IETF, ISO, OIDF, W3C, and other organizations are all actively working to develop their specifications.

ウォレット型モデルでは、ユーザーは自身のIDを「ウォレット」と呼ばれるソフトウェアに保存し、持ち歩くことになります。

このモデルは、3つのコンポーネント、すなわち、クレデンシャルを発行する「発行者」、クレデンシャルを保持する「保持者」、クレデンシャルを検証する「検証者」を含むことから、発行者-保持者-検証者(IHV)モデルと呼ばれることもあります。

前回のスライドでパラダイムシフトについて述べたように、このモデルは新しいユースケースをサポートすることが期待されています。例えば、ホルダーがベリファイアにクレデンシャルを提示する際に、イシュアーに連絡する必要がないため、オフラインでのケースなど、新しいユースケースをサポートすることが可能になります。

しかし、多くの競合する標準規格が存在し、IETF、ISO、OIDF、W3C、その他の組織が、それぞれ仕様策定に積極的に取り組んでいます。 



The last model is the API type. Unlike the previous two, this one is often a system that was introduced without a specific standard specification. It can remain in a closed environment.

最後のモデルはAPIタイプです。前の2つとは異なり、このモデルは特定の標準仕様なしに導入されたシステムであることが多いです。クローズドな環境のままでも構いません。


 

It is very challenging to interconnect systems of different architectures introduced so far. This is because it is often difficult to modify already working systems. Therefore, we sometimes take the approach of placing components called proxies or brokers between systems. The proxy absorbs and converts differences in protocols and data models.

While this approach is often a temporary solution, it tends to create problems in the overall trust model because of the need to trust the proxy.

For example, it is structured like this diagram. There is a wallet-based system in the center. However, because modifying the existing IdP to enable direct communication with the wallet is impossible, the Issuer component is developed as a proxy, and a federation relationship is established with the IdP. Similarly, the Verifier component is developed as a proxy because it is difficult to modify the existing Relying Party to present credentials from the wallet. It behaves as an Identity Provider from the Relying Party's point of view.

これまで紹介してきた異なるアーキテクチャのシステムを相互接続することは非常に困難です。すでに稼働しているシステムを変更することが難しい場合が多いためです。そのため、プロキシやブローカーと呼ばれるコンポーネントをシステム間に配置するアプローチを取ることもあります。プロキシはプロトコルやデータモデルの違いを吸収し、変換します。

このアプローチは一時的な解決策であることが多い一方で、プロキシを信頼する必要があるため、全体的な信頼モデルに問題が生じがちです。

例えば、次のような構成です。中心にウォレットベースのシステムがあります。しかし、既存のIdPを変更してウォレットとの直接通信を可能にすることは不可能であるため、発行者コンポーネントをプロキシとして開発し、IdPとフェデレーション関係を確立します。同様に、既存の依拠当事者(Relying Party)を変更してウォレットからのクレデンシャルを提示することは困難であるため、検証者コンポーネントもプロキシとして開発します。依拠当事者から見ると、このコンポーネントはアイデンティティプロバイダーとして動作します。



I want to introduce one actual use case.

This is a project by the National Institute of Informatics to digitize learner credentials. In this project, learning records issued from existing learning management systems are issued to wallets, and the credentials are used to verify qualifications when submitting papers, etc.

The challenge in implementing the project was that many academic systems, not just in Japan, use the SAML protocol, and in Japan, too, many SAML-based identity systems operate within the ecosystem of the academic federation known as GakuNin. In addition, the learning management system in question was developed based on a middleware called Moodle, and it was necessary to implement a unique API to issue credentials.

実際の利用事例を一つ紹介したいと思います。

これは国立情報学研究所の学習歴証明の電子化プロジェクトです。このプロジェクトでは、既存の学習管理システムから発行される学習記録をウォレットに発行し、その資格情報を論文投稿時などの資格証明に利用します。

このプロジェクトを実施するにあたっての課題は、日本に限らず多くの学術システムがSAMLプロトコルを使用しており、日本でも学認という学術フェデレーションのエコシステム内で多くのSAMLベースのIDシステムが稼働していることでした。また、対象の学習管理システムはMoodleというミドルウェアをベースに開発されており、独自のAPIを実装してクレデンシャルを発行する必要がありました。



This diagram shows an overview of the GakuNin ecosystem that we explained earlier.

The National Institute of Informatics provides the trust framework, and certified universities and research institutions' identity providers and certified applications such as learning management systems and research databases are deployed as relying parties within the ecosystem.

By being authenticated by the university or institution's identity provider, students and researchers can securely single sign-on to many applications, creating a very convenient and secure environment.

この図は、先に説明した学認エコシステムの概要を示しています。 国立情報学研究所がトラストフレームワークを提供し、認定を受けた大学や研究機関のアイデンティティプロバイダーと、学習管理システムや研究データベースなどの認定済みアプリケーションが、エコシステム内の依拠当事者として展開されています。 学生や研究者は、大学や機関のアイデンティティプロバイダーによって認証されることで、多くのアプリケーションに安全にシングルサインオンでき、非常に便利で安全な環境を実現できます。

 


 

We decided to introduce a wallet-based system into this federated environment.

For this reason, we took these approaches to the challenge of interoperability.

First, we embedded the OpenBadge credential the Learning Management System issued using its own API into the Verifiable Credential. We placed a gateway service between Moodle and the wallet and constructed it as an issuer that issues verifiable credentials based on the OpenBadge issued by Moodle. In other words, from the wallet's point of view, the gateway service appears as an Issuer.

Secondly, the Verifiable Credential presented by the wallet was embedded inside the SAML assertion. Since the existing Relying Party supports the SAML protocol, it was impossible to show the Verifiable Credential directly. Therefore, the OpenBadge extracted from the Verifiable Credential was embedded as one of the attributes inside the SAML assertion, and the credential was presented to the Relying Party. To achieve this, we developed a Wallet to SP Connector component. We configured it to appear as a Verifier to the Wallet and an Identity Provider to the Relying Party.

Of course, the Relying Party still needs to implement the appropriate logic to extract the OpenBadge from the SAML assertion, verify it, and use it. Still, there was no need to modify to support new protocols such as OpenID for Verifiable Presentation.

この統合環境にウォレットベースのシステムを導入することを決定しました。

そのため、相互運用性の課題に対して、以下のアプローチをとりました。

まず、LMSが独自のAPIを利用して発行するOpenBadgeクレデンシャルを、検証可能なクレデンシャルに埋め込みました。Moodleとウォレットの間にゲートウェイサービスを配置し、Moodleが発行するOpenBadgeに基づいて検証可能なクレデンシャルを発行する発行者として構築しました。つまり、ウォレットから見ると、ゲートウェイサービスは発行者として表示されます。

次に、ウォレットが提示した検証可能なクレデンシャルはSAMLアサーション内に埋め込まれました。既存のリライングパーティはSAMLプロトコルをサポートしているため、検証可能なクレデンシャルを直接提示することはできません。そのため、検証可能なクレデンシャルから抽出したOpenBadgeをSAMLアサーション内の属性の1つとして埋め込み、リライングパーティにクレデンシャルを提示しました。これを実現するために、私たちは Wallet to SP Connector コンポーネントを開発しました。 Wallet に対してはベリファイアとして、また、リライングパーティに対してはアイデンティティプロバイダーとして表示されるように構成しました。

もちろん、リライングパーティは、SAML アサーションから OpenBadge を抽出し、それを検証し、使用するための適切なロジックを実装する必要があります。それでも、OpenID for Verifiable Presentation などの新しいプロトコルをサポートするために修正する必要はありませんでした。 



This is an overview of the system.

First, the user issues a badge using the Learning Management System. At this point, the user is authenticated using the existing Identity Provider.

Next, the badge is issued to the user's wallet. When the user accesses the gateway, the gateway is also federated with the same Identity Provider as the Learning Management System, and the user is prompted for authentication. This way, the user is granted the appropriate permissions to execute the Moodle API. The gateway service then performs the Moodle API to obtain the issued badge and generate a verifiable credential. The gateway then issues the verifiable credential to the user's wallet as the issuer.

The issuance is now complete.

Finally, let's look at the presentation. In this case, we want to present the credential to the Gakunin RDM research database, but Gakunin RDM only supports the SAML protocol so we will use the Wallet to SP Connector. When the user accesses a specific page on Gakunin RDM, Gakunin RDM uses the SAML protocol to start the Wallet to SP Connector. This is the same operation as a standard SAML-based federation, so it is very easy to implement. When the Wallet to SP Connector is started, it requests the user's wallet to present a verifiable credential per the OpenID for Verifiable Presentation protocol. When the user presents the credential in their purse, the Wallet to SP Connector verifies the signature of the credential, extracts the embedded badge information from the credential, and configures it as a SAML assertion, then sends it to Gakunin RDM using the SAML protocol.

This allows Gakunin RDM to obtain the desired learning credential information, which can then be used to perform access control and other processing.

以下にシステムの概要を示します。

まず、ユーザーは学習管理システムを使用してバッジを発行します。この時点で、ユーザーは既存のアイデンティティプロバイダを使用して認証されます。

次に、バッジがユーザーのウォレットに発行されます。ユーザーがゲートウェイにアクセスすると、ゲートウェイも学習管理システムと同じアイデンティティプロバイダとフェデレーションされており、ユーザーに認証が求められます。これにより、ユーザーにはMoodle APIを実行する適切な権限が付与されます。次に、ゲートウェイサービスがMoodle APIを実行して発行済みのバッジを取得し、検証可能な資格情報を生成します。次に、ゲートウェイが発行者として、検証可能な資格情報をユーザーのウォレットに発行します。

これで発行は完了です。

最後に、プレゼンテーションについて見てみましょう。このケースでは、学認RDM研究用データベースにクレデンシャルを提示したいのですが、学認RDMはSAMLプロトコルしかサポートしていないので、Wallet to SP Connectorを使用します。ユーザーが学認RDM上の特定のページにアクセスすると、学認RDMはSAMLプロトコルを使用してWallet to SP Connectorを開始します。これは標準的なSAMLベースのフェデレーションと同じ操作なので、実装は非常に簡単です。Wallet to SP Connectorが起動すると、OpenID for Verifiable Presentationプロトコルに従って、ユーザーのウォレットに検証可能なクレデンシャルの提示を要求します。ユーザーが財布内のクレデンシャルを提示すると、Wallet to SP Connectorはクレデンシャルの署名を検証し、クレデンシャルから埋め込みのバッジ情報を抽出し、それをSAMLアサーションとして構成し、SAMLプロトコルを使用して学認RDMに送信します。

これにより、学認RDMは必要な学習クレデンシャル情報を取得でき、アクセス制御やその他の処理に使用できるようになります。 

 



We will also introduce activities that address other non-technical considerations.

Open Identity Exchange is working to map the trust frameworks of each country and identify differences.

For example, this will enable the EU to understand what rules were used to issue the credentials issued by Japan and to determine whether additional measures are necessary.

また、技術以外の考慮事項に対処する活動についても紹介します。

Open Identity Exchangeは、各国の信頼フレームワークをマッピングし、相違点を特定する作業を行っています。

例えば、これによりEUは、日本が発行したクレデンシャルを発行する際にどのような規則が用いられたかを理解し、追加の措置が必要かどうかを判断することができます。



There are also activities in the academic world to map frameworks related to qualification levels.

In the academic world, there are two main types of credentials: micro-credentials, mainly learning records, and macro-credentials, which are qualifications such as degrees and credits.

While micro-credentials are becoming increasingly digitized, as in the case of the NII example mentioned earlier, OpenBadge, it is tough to standardize the difficulty of skills. I think this will continue to be a challenge. On the other hand, about macro-credentials, UNESCO has established standards for skill levels so that each country can define levels based on these standards.

学術界でも、資格レベルに関連する枠組みをマッピングする活動があります。

学術界では、主に学習記録であるマイクロ資格と、学位や単位などの資格であるマクロ資格の2つの主要な資格があります。

マイクロ・クレデンシャルは、先ほど例に挙げたNIIのOpenBadgeのように、どんどんデジタル化が進んでいますが、スキルの難易度をどう標準化するかは難しい。これは今後も課題になっていくと思います。一方、マクロ・クレデンシャルについては、ユネスコが技能レベルの基準を定めており、各国がそれをベースにレベルを定義できるようになっています。


 

This is the approach to global standards and mapping as defined by UNESCO.

In this example, the EQF developed by Europe based on UNESCO standards is mapped to the frameworks of other countries.

For example, EQF Level 4 is mapped to Country X Level 5 and Country Y Level 3.

これは、ユネスコが定義するグローバルスタンダードとマッピングへのアプローチです。

この例では、ユネスコの基準に基づいてヨーロッパが開発したEQFが、他の国のフレームワークにマッピングされています。

例えば、EQFレベル4は、国Xのレベル5および国Yのレベル3にマッピングされています。



 In addition, we will introduce some of the activities that have been taking place in Japan recently.

Trusted Web has been underway since 2020, and research into digital identity wallets is being carried out. In addition, the introduction of national ID cards and mobile driver's licenses is already being planned. Starting next March, it will be possible to issue permits for smartphones. In addition, various studies are underway to enable the interoperability of academic credentials with other countries, so I hope that in the future, studies on interoperability with Taiwan and other countries will progress

さらに、最近日本で起こっている活動の一部をご紹介したいと思います。

2020年からTrusted Webが動き出しており、デジタルIDウォレットの研究が進められています。また、国民IDカードやモバイル運転免許証の導入もすでに計画されています。来年3月からは、スマートフォンでの許可証発行が可能になります。また、学歴の相互運用性についても諸外国との間でさまざまな研究が進められており、今後は台湾などとの相互運用性についての研究が進むことを期待しています


Let me finish by summarizing.

First, interoperability is a technical issue and a non-technical consideration, such as rules and frameworks. It is essential to reach agreement on technical matters such as identifiers, transport protocols, and data models. I also explained that semantics and trust frameworks are necessary from a non-technical perspective.

I also explained that we need to respond to the recent paradigm changes of identity systems. To introduce a wallet-based system into a federation-type system that has been used in the past, it is thought that it will be necessary to use components such as proxies and gateways temporarily. I also mentioned that by comparing trust frameworks, it will be possible to clarify what additional processing the systems require to be connected.

In the future, we will need to connect many systems to overcome the silo-based society that has continued since the fall of the Tower of Babel. I hope that we can continue to have discussions like this with everyone.

Thank you.

最後にまとめます。 まず、相互運用性は技術的な問題と、ルールやフレームワークなどの技術的でない考慮事項の両方を含んでいます。識別子、通信プロトコル、データモデルなどの技術的な事項について合意に達することが不可欠です。また、技術的でない観点からは、セマンティクスや信頼フレームワークが必要であることを説明しました。 また、アイデンティティシステムの最近のパラダイム変化に対応する必要があることを説明しました。これまで使われてきたフェデレーション型システムに、ウォレット型システムを導入するには、プロキシやゲートウェイなどのコンポーネントを一時的に使用する必要があると考えられます。また、信頼フレームワークを比較することで、システムを接続するためにどのような追加処理が必要かを明確にできることを述べました。 今後は、バベルの塔の崩壊以来続いてきた縦割り社会を乗り越えるためにも、多くのシステムを接続していく必要があります。今後も皆さんとこのような議論を続けていければと思います。 ありがとうございました。



プロンプターが欲しかったプレゼンでした・・・ 

ちなみに始まる前にオープンニングトークをしてくれた台湾のデジタル副大臣(私の左側)と登壇者全員で記念写真を撮りました。なんかセレモニーみたいでいいですね。







Hyperonomy Digital Identity Lab

Building a Knowledge Graph from Wikipedia in Neo4j

https://guides.neo4j.com/wiki https://github.com/jbarrasa/datasets/blob/master/wikipedia/data/cats.csv?raw=true https://github.com/jbarrasa/datasets/blob/master/wikipedia/data/rels.csv?raw=true

Toronto Songwriter/Performer Use Case: DID Method Candidates

Copyright (c) 2024 Michael Herman (Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public Licensehttps://creativecommons.org/licenses/by-sa/4.0/legalcode

Copyright (c) 2024 Michael Herman (Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License
https://creativecommons.org/licenses/by-sa/4.0/legalcode

Sunday, 15. December 2024

IdM Laboratory

年明けはデジタルアイデンティティ人材育成推進WG:活動報告会から

こんにちは、富士榮です。 年明け1/14はデジタルアイデンティティ人材育成推進WGの活動報告会があります。 https://openid.connpass.com/event/339259/ 例の本が年末に販売されることもあり、翻訳を担当したメンバーから苦労話など聞ける良い機会になると思いますのでぜひご来場ください。

こんにちは、富士榮です。


年明け1/14はデジタルアイデンティティ人材育成推進WGの活動報告会があります。

https://openid.connpass.com/event/339259/



例の本が年末に販売されることもあり、翻訳を担当したメンバーから苦労話など聞ける良い機会になると思いますのでぜひご来場ください。

Saturday, 14. December 2024

IdM Laboratory

今年もKim Cameronアワードのノミネートが始まっています

こんにちは、富士榮です。 これまで何度かポストした、Kim CameronアワードやVittorio Bertocciアワードですが、今年もKim Cameronアワードのノミネートが始まりました。 https://digitalidadvancement.org/awards-and-grants/kim/2025-kca/ 今後のスケジュールはこんな感じなので、我こそは!という方は申請してみてはいかがでしょうか? December 11: Call for Applications Opens January 21: Call for Applications Closes January 31: Awardees Notified February 7: Awardee Confirmation of Acceptance Due 30 Days

こんにちは、富士榮です。

これまで何度かポストした、Kim CameronアワードやVittorio Bertocciアワードですが、今年もKim Cameronアワードのノミネートが始まりました。

https://digitalidadvancement.org/awards-and-grants/kim/2025-kca/




今後のスケジュールはこんな感じなので、我こそは!という方は申請してみてはいかがでしょうか?

December 11: Call for Applications Opens January 21: Call for Applications Closes January 31: Awardees Notified February 7: Awardee Confirmation of Acceptance Due 30 Days Post-Event: Awardee Receipts for Reimbursement Due 30 Days Post-Event: Awardee Reflections Due

Friday, 13. December 2024

IdM Laboratory

OAuth Security Workshopの参加登録が始まっています

こんにちは、富士榮です。 先日お知らせした通り次回のOAuth Security Workshopはアイスランドで開催です。 https://idmlab.eidentity.jp/2024/09/oauth-security-workshop.html ということで参加登録が開始されていますので申し込みましょう! https://oauth.secworkshop.events/osw2025 なお、11月後半にレイキャビクの近くで火山の噴火があったようです。Danielに聞いたら大丈夫、との話でしたが様子を見つつ参加することになりそうですね。 一応大使館のページをみると12/9に収束した、という宣言は出ていますし。 https://www.is.emb-japan.go.jp/itpr_ja/volcano.html
こんにちは、富士榮です。
先日お知らせした通り次回のOAuth Security Workshopはアイスランドで開催です。 https://idmlab.eidentity.jp/2024/09/oauth-security-workshop.html
ということで参加登録が開始されていますので申し込みましょう! https://oauth.secworkshop.events/osw2025
なお、11月後半にレイキャビクの近くで火山の噴火があったようです。Danielに聞いたら大丈夫、との話でしたが様子を見つつ参加することになりそうですね。 一応大使館のページをみると12/9に収束した、という宣言は出ていますし。 https://www.is.emb-japan.go.jp/itpr_ja/volcano.html




Werdmüller on Medium

The open social web is the future of the internet. Here’s why I’m excited.

It gives you back control. Continue reading on Medium »

It gives you back control.

Continue reading on Medium »

Thursday, 12. December 2024

IdM Laboratory

Googleが公開している「4分でパスキーを理解する」動画が素晴らしい件

こんにちは、富士榮です。 昨日はFIDO東京セミナーでしたね。私は台北にいたので参加できませんでしたが・・・ ということで悔しいので #fido でXを追いかけていましたが、えーじさんのパート(だと思う)で触れられていたっぽい「4分でパスキーを理解する」動画が素晴らしくわかりやすいかったのでメモしておこうというポストです。 ざっくりシナリオはこんな感じでした。 長らくパスワードを使ってきたけど、難しいパスワードは覚えられないし、同じパスワードの使い回しが起きるので危ないよね そんなあなたにGoogleはパスワードマネージャを提供しているよ! デバイスを跨いで同期されるのでとっても便利! でも全員がパスワードマネージャに頼っているわけじゃないよね その前にそもそもパスワードってセキュアじゃないよ 2段階認証はセキュリティ強度を上げるけど面倒だしなぁ そんな

こんにちは、富士榮です。


昨日はFIDO東京セミナーでしたね。私は台北にいたので参加できませんでしたが・・・

ということで悔しいので #fido でXを追いかけていましたが、えーじさんのパート(だと思う)で触れられていたっぽい「4分でパスキーを理解する」動画が素晴らしくわかりやすいかったのでメモしておこうというポストです。


ざっくりシナリオはこんな感じでした。

長らくパスワードを使ってきたけど、難しいパスワードは覚えられないし、同じパスワードの使い回しが起きるので危ないよね そんなあなたにGoogleはパスワードマネージャを提供しているよ! デバイスを跨いで同期されるのでとっても便利! でも全員がパスワードマネージャに頼っているわけじゃないよね その前にそもそもパスワードってセキュアじゃないよ 2段階認証はセキュリティ強度を上げるけど面倒だしなぁ そんなあなたにパスキー! パスキーはセキュアで安全なテクノロジーなんだ 多くのサイトにパスワードなしでログインができるんだよ OSやブラウザがプロンプトを出してくるだけで、ユーザはスマホのロック解除と同じことをすればいいんだ これはすごくベネフィットがあって、ログインが簡単だからユーザはドロップしないしコンバージョンレートもあげられる 2段階認証にかかるコストもかからない フィッシングにも強いんだ パスキーは公開鍵暗号技術で構成されているんだよ 秘密鍵はデバイスに保管され、スクリーンロック解除のメカニズムでアクセスできる その秘密鍵とセットになっている公開鍵はサーバに保存される 秘密の情報はサーバに保存されないからサーバからの漏洩の心配はないよ そしてパスキーは生成したデバイスごとに保存されるんだ だから別の人がパスキーを不正に使うことはできないんだ パスキーは多くのブラウザやプラットフォームでサポートされているよ そしてパスキーはクレデンシャルマネージャを経由してバックアップすることもできる だから新しいAndroidデバイスを手に入れても同じGoogleアカウントでログインすればパスキーを引き継ぐことができるんだ またパスキーは同期できないデバイスに対しても使うことができるんだ。これにはハイブリッドプロトコルを使うんだ 例えばAndroidデバイスの持ち主がMacOSのブラウザにログインするときはQRコードを読み込んでAndroidデバイス側でパスキーをつかうとMacOS側でログインできる 今すぐパスキーを導入しよう! 安全で便利な世の中が待っているよ 結構4分に詰め込んだなぁ、、って印象ですが流れがしっかり練り込まれているので非常にわかりやすかったです。 でも多分、本当は「3分でわかるパスキー」にしたかったんだろうなぁw

Wednesday, 11. December 2024

IdM Laboratory

SIDI HubワシントンD.Cサミットのレポートが出ています

こんにちは、富士榮です。 先日、東京サミットのレポートが出た、という話を書いた段階ではまだワシントンDCレポートが出ていなかったので順番が逆になっちゃたなぁ、みたいなことを思っていたのですが、ポストを公開した直後にワシントンDCのレポートも公開されました。 他のレポートと同じく、こちらのページからダウンロードできますので、おいおい読んでいこうと思います。 https://sidi-hub.community/summits/

こんにちは、富士榮です。

先日、東京サミットのレポートが出た、という話を書いた段階ではまだワシントンDCレポートが出ていなかったので順番が逆になっちゃたなぁ、みたいなことを思っていたのですが、ポストを公開した直後にワシントンDCのレポートも公開されました。


他のレポートと同じく、こちらのページからダウンロードできますので、おいおい読んでいこうと思います。

https://sidi-hub.community/summits/


Tuesday, 10. December 2024

IdM Laboratory

SSFの相互運用イベントがGartnerサミットと並列で行われています

こんにちは、富士榮です。 今週私は台湾にいるわけですが、USではGartnerサミットが開催されています。 その場でShare Signals Frameworkの相互運用検証に関するイベント(実際に実装を持ち寄って繋いでみる)が行われています。 https://openid.net/oidf-returns-to-gartner-to-showcase-shared-signals-interoperability/ 過去にも何度か実施されており、非常に良い結果が出ていますので、今回も色々な実装を繋いだ結果が出てくることを楽しみにしています。 特にSSFのような仕組みは複数の事業者の実装が相互に接続できないと何の意味もないものなので、良い取り組みだと思います。 そういえば、Identity Dance Advent Calendarの中でGoogle
こんにちは、富士榮です。
今週私は台湾にいるわけですが、USではGartnerサミットが開催されています。 その場でShare Signals Frameworkの相互運用検証に関するイベント(実際に実装を持ち寄って繋いでみる)が行われています。

https://openid.net/oidf-returns-to-gartner-to-showcase-shared-signals-interoperability/
過去にも何度か実施されており、非常に良い結果が出ていますので、今回も色々な実装を繋いだ結果が出てくることを楽しみにしています。 特にSSFのような仕組みは複数の事業者の実装が相互に接続できないと何の意味もないものなので、良い取り組みだと思います。
そういえば、Identity Dance Advent Calendarの中でGoogleのSSF APIを試している記事がポストされています。皆さんも手軽にSSFが試せる時代になってきましたので、試してみると良いかもしれません。 https://qiita.com/sooooda/items/f0f5414cafc20792d77d

@_Nat Zone

2024年第4四半期ID関連ニュース総振り返り

早いもので2024年も終わりですね。慶応大学の林さんと2024年第4四半期のID関連ニュースの振り返りを行いたいと思います。 日時:12月17日 20:00〜場所:YouTube Live @55id対象とするニュース一覧:https://www.sakimura.org/202…

早いもので2024年も終わりですね。慶応大学の林さんと2024年第4四半期のID関連ニュースの振り返りを行いたいと思います。

日時:12月17日 20:00〜
場所:YouTube Live @55id
対象とするニュース一覧:https://www.sakimura.org/2024/10/6482/

みなさま、お誘い合わせの上お越しください。

Monday, 09. December 2024

IdM Laboratory

OpenID for Verifiable Presentationsの投票期間が間も無く始まります

こんにちは、富士榮です。 先日投稿した、OpenID for Verifiable PresentationsのImplementers DraftのPublic Review期間が終わり、Vote期間に入ります。 https://openid.net/notice-of-vote-for-proposed-implementers-draft-of-openid-for-openid-for-verifiable-presentations/ 12月17日〜24日の間が投票期間ですので、メンバーの方は忘れずに投票しましょう。 (公式な投票期間は上記ですが、実際は12月10日から投票は開始されます)

こんにちは、富士榮です。


先日投稿した、OpenID for Verifiable PresentationsのImplementers DraftのPublic Review期間が終わり、Vote期間に入ります。


https://openid.net/notice-of-vote-for-proposed-implementers-draft-of-openid-for-openid-for-verifiable-presentations/


12月17日〜24日の間が投票期間ですので、メンバーの方は忘れずに投票しましょう。

(公式な投票期間は上記ですが、実際は12月10日から投票は開始されます)




Damien Bod

Using Entra External ID with an Auth0 OpenID Connect identity provider

This post looks at implementing an Open ID Connect identity provider in Microsoft Entra External ID. Auth0 is used as the identity provider and an ASP.NET Core application is used to test the authentication. Microsoft Entra External ID federates to Auth0. Client code: https://github.com/damienbod/EntraExternalIdCiam Microsoft Entra External ID supports federation using OpenID Connect and was […]

This post looks at implementing an Open ID Connect identity provider in Microsoft Entra External ID. Auth0 is used as the identity provider and an ASP.NET Core application is used to test the authentication. Microsoft Entra External ID federates to Auth0.

Client code: https://github.com/damienbod/EntraExternalIdCiam

Microsoft Entra External ID supports federation using OpenID Connect and was used to create the Auth0 OpenID Connect client. The settings configured in the portal must align with those in the Auth0 identity provider. The Entra External ID OIDC client would work with most IDPs, since standard OpenID Connect is used.

The corresponding client configuration was created in Auth0:

The Auth0 client in this setup returns the email in the name claim. This must match in the claim mapping in Entra External ID. The email claim is switched to use the name claim. Depending on the mappings, different claim mappings are required. The values are read from the id_token.

The correct callback URLs MUST be set on the Auth0 client configuration. Entra External ID requires the following redirectly URLs:

https://<tenant-subdomain>.ciamlogin.com/<tenant-ID>/federation/oauth2 https://<tenant-subdomain>.ciamlogin.com/<tenant-subdomain>.onmicrosoft.com/federation/oauth2

The values are added to the Auth0 client. See the Entra External ID docs.

Once the OpenID Connect client is setup, the identity provider can used in the Entra External ID user flow. Select the required user flow:

And select the Identity Providers and add the OpenID connect IdP.

To test, an ASP.NET Core application using Microsoft.Identity.Web was implemented to authenticate against Entra External ID. When the user is redirected the authenticate, the sign-in with Auth0 option is displayed.

Notes

This works well, but setting up the mappings can be difficult if you don’t know the mapping. With this it is possible now to use identities from almost any identity provider.

Links

https://learn.microsoft.com/en-us/entra/external-id/customers/how-to-custom-oidc-federation-customers

Saturday, 07. December 2024

Mike Jones: self-issued

Integrity Properties for Federations

I’m writing to highly recommend the article “How to link an application protocol to an OpenID Federation 1.0 trust layer” by Vladimir Dzhuvinov. In it, he defines two kinds of integrity for Federations, and describes how to achieve them: Federation Integrity, which is defined as: This ensures mutual trust between two entities is established always […]

I’m writing to highly recommend the article “How to link an application protocol to an OpenID Federation 1.0 trust layer” by Vladimir Dzhuvinov. In it, he defines two kinds of integrity for Federations, and describes how to achieve them:

Federation Integrity, which is defined as:

This ensures mutual trust between two entities is established always from a common trust anchor. Any resolved metadata and policies that govern the client application and the OpenID provider in a transaction will then fall under the rules of the same federation and thus will be aligned and consistent with one another.

Metadata Integrity, which is defined as:

It ensures the trust chains for an entity to a given trust anchor will invariably result in consistent metadata and policies. The natural way to achieve this is for the federation topology under a trust anchor to form a tree. Topologies that lead to multiple paths from a leaf entity to a trust anchor are to be avoided.

The article also explores how application protocols, such as OpenID Connect or digital wallet protocols, can achieve those properties in practice (and when they do and don’t need to).

Finally, I’ll note that, as a result of Vladimir’s and others’ thinking about the topic, we just added a section on Federation Topologies to the OpenID Federation specification, which provides concrete guidance on how to achieve Metadata Integrity.

I’ll stop here so as not to repeat all the useful content in Vladimir’s article. By all means, give it read!

Tuesday, 03. December 2024

Wrench in the Gears

Review of “Wicked” The Movie – Prophecy, Quantum Dance, Self-Actualization, and the Tao in Pink and Green

This movie outing was a post-Thanksgiving indulgence for a gal who rarely goes out. After seeing it, I empathize with principled, strong Elphaba and can’t help but picture her waif counterpart, queen bee Galinda (Glinda), as having a bright post-Shiz University career as a savvy but manipulative social impact investor. This particular episode will work [...]

This movie outing was a post-Thanksgiving indulgence for a gal who rarely goes out. After seeing it, I empathize with principled, strong Elphaba and can’t help but picture her waif counterpart, queen bee Galinda (Glinda), as having a bright post-Shiz University career as a savvy but manipulative social impact investor.

This particular episode will work better if you are able to watch it while listening, because I added supporting screenshots during the editing process. Also if you are tempted to insert some banal “Federal Reserve” commentary in the comments, see the second, shorter video. My public service announcement for the day from the scamming Wizard of Oz, “there is nothing better to unite people than to give them a really good enemy.” That could be Elphaba or the Rothschilds.

Monday, 02. December 2024

Damien Bod

Using ASP.NET Core with Azure Key Vault

This article looks at setting up an ASP.NET Core application to use Azure Key Vault. When deployed to Azure, it works like in the Azure documentation but when working on development PCs, some changes are required for a smooth developer experience. Code: https://github.com/damienbod/UsingAzureKeyVaultInDevelopment I develop using Visual Studio and manage multiple accounts and test environments. […]

This article looks at setting up an ASP.NET Core application to use Azure Key Vault. When deployed to Azure, it works like in the Azure documentation but when working on development PCs, some changes are required for a smooth developer experience.

Code: https://github.com/damienbod/UsingAzureKeyVaultInDevelopment

I develop using Visual Studio and manage multiple accounts and test environments. However, I frequently encounter access errors when using DefaultAzureCredentials. These errors typically occur because the account and tenant do not match the filter set in Visual Studio, or the user lacks access to the tenant. This issue arises often:

The problem can be resolved by using an application client secret to access the Azure Key Vault, implemented with the ChainedTokenCredential. The access client can be specified in the project’s user secrets, allowing it to function independently of the user account and the last filter used in Visual Studio. To set this up, a new Azure App registration was created, and a client secret was added. This client secret is then included in the dotnet user secrets for the project.

A Role assignment was added to the Azure Key Vault for the application service principal, and the necessary access role was configured. With the correct configuration in the user secrets on the development PC, the application can access the Azure Key Vault. This setup eliminates the need for Azure RBAC changes for each developer.

Setup local development credentials

The following Nuget packages can be used to integrate a Key Vault client in an ASP.NET Core application. Depending on how the client is setup, or what data is used from the Key Vault, different packages can be used.

Azure.Extensions.AspNetCore.Configuration.Secrets Azure.Identity Azure.Security.KeyVault.Certificates Azure.Security.KeyVault.Secrets

A ChainedTokenCredential is used to access the Key Vault, preventing the access issues associated with DefaultAzureCredential. In local development, a client credential is used via a secret, which can be stored in the dotnet user secrets. When a new developer joins the team, these user secrets can be shared, eliminating the need to modify Azure Key Vault RBAC settings for each new developer. This setup is ideal for development, as it avoids problems caused by incorrect tenants or user accounts in Visual Studio. For production or other deployments, a system-assigned managed identity is used.

using Azure.Identity; namespace DevelopmentAspNetCoreKeyVault; public static class AppAccessCredentials { public static ChainedTokenCredential GetChainedTokenCredentials(IConfiguration configuration, bool isDevelopment) { if (!isDevelopment) { // Use a system assigned managed identity on production deployments return new ChainedTokenCredential(new ManagedIdentityCredential()); } else // dev env { var tenantId = configuration.GetValue<string>("EntraId:TenantId", string.Empty); var clientId = configuration.GetValue<string>("EntraId:ClientId", string.Empty); var clientSecret = configuration.GetValue<string>("EntraId:ClientSecret", string.Empty); var options = new TokenCredentialOptions { AuthorityHost = AzureAuthorityHosts.AzurePublicCloud }; if (string.IsNullOrEmpty(tenantId)) // DevOps { // Use DefaultAzureCredential if AzureCliCredential is not used in your DevOps return new ChainedTokenCredential(new AzureCliCredential()); } // https://docs.microsoft.com/dotnet/api/azure.identity.clientsecretcredential var devClientSecretCredential = new ClientSecretCredential( tenantId, clientId, clientSecret, options); var chainedTokenCredential = new ChainedTokenCredential(devClientSecretCredential); return chainedTokenCredential; } } }

The user secrets would have something like this:

{ "EntraId": { // aspnetcore-keyvault-development-access "TenantId": "--tenant_id--", "ClientId": "--client_id--", "ClientSecret": "--secret--" } }

Using Key Vault directly in the application

The secret from the Azure Key Vault can be used directly in the code by using the SecretClient class from Azure.Identity. The AppAccessCredentials is used to return the chained credentials and the application is authenticated if the service principal from the App registration has the correct RBAC.

// Azure SDK direct var client = new SecretClient(new Uri(_configuration["AzureKeyVaultEndpoint"]!), AppAccessCredentials.GetChainedTokenCredentials(_configuration, _hostEnvironment.IsDevelopment())); var secret = await client.GetSecretAsync("demosecret"); DemoSecret = secret!.Value.Value;

Using Key Vault as a configuration

The AddAzureKeyVault method can be used to use the Azure Key as a further configuration option. I like this as all configuration is abstracted with the IConfiguration interface in the application. The AddAzureKeyVault takes the chained credential as a param.

var keyVault = builder.Configuration["AzureKeyVaultEndpoint"]; if(!string.IsNullOrEmpty(keyVault)) { builder.Configuration.AddAzureKeyVault( new Uri($"{builder.Configuration["AzureKeyVaultEndpoint"]}"), AppAccessCredentials.GetChainedTokenCredentials(builder.Configuration, builder.Environment.IsDevelopment())); }

The secret can be read anywhere in the code using the IConfiguration interface. This can be used in different ways and provides type safe ways of using the properties.

// ASP.NET Core configuration // From from key vault using ASP.NET Core configuration integration // Or from user secrets if offline, or fast startup is required DemoSecretConfig = _configuration["demosecret"];

Using user secrets for local development

Sometimes, you need to work offline or frequently restart the application. Constantly connecting to Azure Key Vault can slow down development. In such cases, it’s often more efficient to use dotnet user secrets instead of Azure Key Vault.

Note

This is a good and simple approach for developing applications which use Azure Key Vault. You can use a local key management system or whatever local developers use. The client secret should not be used in production deployments as the secret expires and there are better ways to secure the access for the application to Key Vault. System assigned managed identity is the best way to implement application access in Azure in production environments.

Links

https://learn.microsoft.com/en-us/aspnet/core/security/key-vault-configuration

https://docs.microsoft.com/en-us/azure/key-vault/key-vault-developers-guide

Securing Azure Functions using an Azure Virtual Network
Using Key Vault and Managed Identities with Azure Functions
Using Azure Key Vault with ASP.NET Core and Azure App Services

https://stackoverflow.com/questions/40025598/azure-key-vault-access-denied

https://cmatskas.com/securing-asp-net-core-application-settings-using-azure-key-vault/

https://github.com/jayendranarumugam/DemoSecrets/tree/master/DemoSecrets

https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest

https://anthonysimmon.com/defaultazurecredential-local-development-optimization/

Sunday, 01. December 2024

Werdmüller on Medium

My OKRs for 2025

Using Objectives and Key Results to get through a difficult year Continue reading on Medium »

Using Objectives and Key Results to get through a difficult year

Continue reading on Medium »


Mike Jones: self-issued

Three New Specs Enhancing OpenID Federation and New Contributors

The OpenID Connect working group recently adopted three new specifications that build upon and provide new capabilities to OpenID Federation. But I’m not only happy about these because of the engineering benefits they bring. I’m particularly happy because they bring new active contributors to the work, specifically Michael Fraser and Łukasz Jaromin, as well as […]

The OpenID Connect working group recently adopted three new specifications that build upon and provide new capabilities to OpenID Federation. But I’m not only happy about these because of the engineering benefits they bring.

I’m particularly happy because they bring new active contributors to the work, specifically Michael Fraser and Łukasz Jaromin, as well as continuing the strong work by Giuseppe De Marco, who’s become a leader in the space. They’re also supported by a few veterans: Roland Hedberg, John Bradley, and yours truly, plus now the full OpenID Connect working group.

Here’s the three new specifications, along with an abstract for each of them:

1. OpenID Federation Extended Subordinate Listing

This specification acts as an extension to OpenID Federation 1.0. It outlines methods to interact with a given Federation with a potentially large number of registered Entities, as well as mechanisms to retrieve multiple entity statements along with associated details in a single request.

2. OpenID Federation Wallet Architectures

As digital wallets become increasingly deployed for managing identity credentials, establishing an architecture for trusted communication is required to allow each participant in the ecosystem to evaluate other participants’ compliance with mutual trust frameworks and accomplish secure and trusted transactions.

This specification defines how to use OpenID Federation 1.0 to enhance the security and interoperability of wallet ecosystems, facilitating trust establishment among the parties and enabling secure metadata exchange and policy application across large scale deployments. It outlines the general architecture of a federated trust infrastructure for wallet ecosystems, identifying participant roles and describing the use of those roles.

3. OpenID Connect Relying Party Metadata Choices

This specification extends the OpenID Connect Dynamic Client Registration 1.0 specification to enable RPs to express a set of supported values for some RP metadata parameters, rather than just single values. This functionality is particularly useful when Automatic Registration, as defined in OpenID Federation 1.0, is used, since there is no registration response from the OP to tell the RP what choices were made by the OP. This gives the OP the information that it needs to make choices about how to interact with the RP in ways that work for both parties.

Thanks to the members of the OpenID Connect working group who helped refine them before adoption, and are now working on progressing them in the working group.

Saturday, 30. November 2024

Heres Tom with the Weather

Austin Indieweb at Radio Coffee

On Wednesday 12/04 at 7pm, the Austin Indieweb Meetup returns to Radio Coffee and Beer. Count me in.

On Wednesday 12/04 at 7pm, the Austin Indieweb Meetup returns to Radio Coffee and Beer. Count me in.

Friday, 29. November 2024

Hyperonomy Digital Identity Lab

Model 37. Multi-dimensional Overton Olive (MuDOO) as an ADKAR-enabled Change Management Framework (MuDOO-ADKAR)

Copyright © 2024 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License Also Checkout:

Copyright © 2024 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License

Also Checkout:

Model 35. Overton Olive Digital Twin (#OvertonOlive #DigitalTwin) https://hyperonomy.com/2024/11/27/overton-olive-overtonolive/ Model 36. Overton Visual Taxonomy https://hyperonomy.com/2024/11/28/model-36-overton-visual-taxonomy/ Want to know more about ADKAR? https://www.prosci.com/methodology/adkar


Model 36. Overton Visual Taxonomy

Copyright © 2024 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License Model 36. Overton Visual Taxonomy Additional Information:

Copyright © 2024 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License

Model 36. Overton Visual Taxonomy

Additional Information:

Model 35. Overton Olive Digital Twin (#OvertonOlive #DigitalTwin) https://hyperonomy.com/2024/11/27/overton-olive-overtonolive/ Model 37. Multi-dimensional Overton Olive (MuDOO) as an ADKAR-enabled Change Management Framework (MuDOO-ADKAR)

Wednesday, 27. November 2024

Hyperonomy Digital Identity Lab

Model 35. Overton Olive Digital Twin (#OvertonOlive #DigitalTwin)

Copyright © 2024 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License Model 35. #OvertonOlive #DigitalTwin (click the diagram to enlarge it) Progressive Improvement through Continuous Transformation For more background on the #OvertonOlive:

Copyright © 2024 Michael Herman (Bindloss, Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License

Model 35. #OvertonOlive #DigitalTwin (click the diagram to enlarge it)
Progressive Improvement through Continuous Transformation

For more background on the #OvertonOlive:

Model 36. Overton Visual Taxonomy
https://hyperonomy.com/2024/11/28/model-36-overton-visual-taxonomy/ How We Think About How We Work
https://hyperonomy.com/2016/05/09/how-do-we-think-about-how-we-work/ Using #Graphitization to Create Your Organization’s Digital Twin
https://hyperonomy.com/2017/01/02/graphitization-of-the-enterprise/ Crossing the Enterprise Architecture Chasm
https://hyperonomy.com/2016/10/04/crossing-the-enterprise-architecture-chasm/ What are the differences between improving the design (and operation) of a smart city, an aircraft engine, a muscle car, a large enterprise, and an economic system …at hyperscale?
https://hyperonomy.com/2017/04/10/whats-the-difference-between-improving-the-design-and-operation-of-an-aircraft-engine-a-muscle-car-a-large-enterprise-and-a-commercial-global-cloud-services-platform/

Talking Identity

Broadening the Definition of Identity Practitioner

One of the wonderful, yet also daunting, aspects of being in the Identity industry is realizing just how far-reaching and all-encompassing its scope and boundaries are. It’s why we need more than just technologists and standards wonks engaged in driving the future of this industry. I’ve been on stage at Identiverse and other conferences for […]

One of the wonderful, yet also daunting, aspects of being in the Identity industry is realizing just how far-reaching and all-encompassing its scope and boundaries are. It’s why we need more than just technologists and standards wonks engaged in driving the future of this industry. I’ve been on stage at Identiverse and other conferences for many years challenging the Identirati to bring in people from other fields like User Experience Research, Law, Privacy, and more.

This is the challenge that the Digital Identity Advancement Foundation has taken on. You can check out how they are doing this on their website, via the Kim Cameron Award and the Vittorio Bertocci Award. Thanks to Arynn Crow, I had the chance to spend some time chatting with the 2024 Kim Cameron award winner, legal scholar Grace Klutke, at Authenticate 2024. We talked (in my usual rambling sort of way) about ethics in Identity, and the broader impact on human rights, inclusion, and access (in the human and not the technical Authorization sense). You can read her reflection on her experience at the conference here.

Oh, and support DIAF if you can. They’re doing good, and necessary, work! If DIAF continues to bring smart, talented, and motivated individuals like her from other fields into our industry, then we’ll be doing it right.

Monday, 25. November 2024

Just a Theory

RFC: Extension Packaging & Lookup

A proposal to modify the PostgreSQL core so that all files required for an extension live in a directory named for the extension, along with a search path to find extension directories.

Several weeks ago, I started a pgsql-hackers thread proposing a new extension file organization and a search path GUC for finding extensions. The discussion of Christoph Berg’s extension_destdir patch inspired this proposal. These threads cover quite a lot of territory, so I want to pull together a more unified, public proposal.

Here goes.

Challenges

A number of challenges face extension users, thanks to extension file organization in the Postgres core. The common thread among them is the need to add extensions without changing the contents of the Postgres installation itself.

Packager Testing

On Debian systems, the user account that creates extension packages lacks permission to add files to Postgres install. But testing extensions requires installing the extension where Postgres can find it. Moreover, extensions ideally build against a clean Postgres install; adding an extension in order to run make installcheck would pollute it.

Christoph’s patch solves these problems by adding a second lookup path for extensions and dynamic modules, so that Postgres can load them directly from the package build directory.

Alas, the patch isn’t ideal, because it simply specifies a prefix and appends the full pg_config directory paths to it. For example, if --sharedir outputs /opt/share and extension_destdir GUC is set to /tmp/build/myext, the patch will search in /tmp/build/myext/opt/share. This approach works for the packaging use case, which explicitly uses full paths with a prefix, but would be weird for other use cases.

Peter Eisentraut proposed an alternate patch with a new GUC, extension_control_path, that provides a more typical search path pattern to find extension control files, but doesn’t account for shared modules that ship with an extension, requiring that they still live in the dynamic_library_path. Installing into custom directories requires the undocumented datadir and pkglibdir variables:

make install datadir=/else/where/share pkglibdir=/else/where/lib

This pattern can probably be simplified.

OCI Immutability

OCI (née Docker) images are immutable, while a container image runs on a writeable but non-persistent file system. To install persistent extensions in a container, one must create a persistent volume, map it to SHAREDIR/extensions, and copy over all the extensions it needs (or muck with symlink magic). Then do it again for shared object libraries (PKGLIBDIR), and perhaps also for other pg_config directories, like --bindir. Once it’s all set up, one can install a new extension and its files will be distributed to the relevant persistent volumes.

This pattern makes upgrades tricky, because the core extensions are mixed in with third-party extensions. Worse, the number of directories that must be mounted into volumes depends on the features of an extension, increasing deployment configuration complexity. It would be preferable to have all the files for an extension in one place, rather than scattered across multiple persistent volumes.

Peter Eisentraut’s patch addresses much of this issue by adding a search path for extension control files and related data/share files (generally SQL files). One can create a single volume with a lib directory for shared modules and share/extension directory for control and data/share files.

OCI Extension Images

However, an additional wrinkle is the ambition from the CloudNativePg (CNPG) community to eliminate the need for a persistent volume, and rely instead on mounting images that each contain all the files for a single extension as their own volumes, perhaps using Kubernetes image volume feature, (currently in alpha).

This feature requires all the file in an extension to live in a single directory, a volume mounted to an extension image contains all the files required to use the extension. The search path patches proposed so far do not enable this behavior.

Postgres.app Immutability

The macOS Postgres.app supports extensions. But installing one into SHAREDIR/extensions changes the contents of the Postgres.app bundle, breaking Apple-required signature validation. The OS will no longer be able to validate that the app is legit and refuse to start it.

Peter Eisentraut’s new patch addresses this issue as well, with all the same caveats as for the packager testing challenges.

Solution

To further address these issues, this RFC proposes to change file organization and lookup patterns for PostgreSQL extensions.

Extension Directories

First, when an extension is installed, by default all of its files will live in a single directory named for the extension. The contents include:

The Control file that describes extension Subdirectories for SQL, shared modules, docs, binaries, etc.

Subdirectories roughly correspond to the pg_config --*dir options:

bin: Executables doc: Documentation files html: HTML documentation files lib: Dynamically loadable modules locale: Locale support files man: Manual pages share: SQL and other architecture-independent support files

This layout reduces the cognitive overhead for understanding what files belong to what extension. Want to know what’s included in the widget extension? Everything is in the widget directory. It also simplifies installation of an extension: one need add only a directory named for and containing the files required by the extension.

Configuration Parameter

Add a new pg_config value that returns the directory into which extensions will by default be installed:

--extdir show location of extensions

Its default value would be $(pg_config --sharedir)/extension, but could be set at compile time like other configuration parameters. Its contents consist of subdirectories that each contain an extension, as described in Extension Directories. With a few extensions installed, it would look something like:

❯ ls -1 "$(pg_config --extdir)" auto_explain bloom isn pair plperl plpgsql plv8 xml2 semver vector Extension Path

Add an extension lookup path GUC akin to dynamic_library_path, called extension_path. It lists all the directories that Postgres will search for extensions and their files. The default value for this GUC will be:

extension_path = '$extdir'

The special string $extdir corresponds to the pg_config option of the same name, and function exactly as $libdir does for the dynamic_library_path GUC, substituting the appropriate value.

Lookup Execution

Update PostgreSQL’s CREATE EXTENSION command to search the directories in extension_path for an extension. For each directory in the list, it will look for the extension control file in a directory named for the extension:

$dir/$extension/$extension.control

The first match will be considered the canonical location for the extension. For example, if Postgres finds the control file for the pair at /opt/pg17/ext/pair/pair.control, it will load files only from the appropriate subdirectories, e.g.:

SQL files from /opt/pg17/ext/pair/share Shared module files from /opt/pg17/ext/pair/lib PGXS

Update the extension installation behavior of PGXS to install extension files into the new layout. A new variable, $EXTDIR, will define the directory into which to install extension directories, and default to $(pg_config --extdir). It can be set to any literal path, which must exist and be accessible by the PostgreSQL service.

The $EXTENSION variable will be changed to allow only one extension name. If it’s set, the installation behavior will be changed for the following variables:

EXTENSION: Creates $EXTDIR/$EXTENSION, installs $EXTDIR/$EXTENSION/$EXTENSION.control MODULES and MODULE_big: Installed into $EXTDIR/$EXTENSION/lib MODULEDIR: Removed DATA and DATA_built: Installed into $EXTDIR/$EXTENSION/share DATA_TSEARCH: Installed into $EXTDIR/$EXTENSION/share/tsearch_data DOCS: Installed into $EXTDIR/$EXTENSION/doc PROGRAM, SCRIPTS and SCRIPTS_built: Installed into $EXTDIR/$EXTENSION/bin

Each of these locations can still be overridden by setting one of the (currently undocumented) installation location options (e.g., datadir, pkglibdir, etc.).

External projects that install extensions without using PGXS, like

pgrx, must also be updated to either follow the same pattern or to delegate installation to PGXS.

Control File

The directory control file parameter will be deprecated and ignored.

The module_pathname parameter should only name a shared module in the lib subdirectory of an extension directory. Any existing use of a $libdir prefix will be stripped out and ignored before replacing the MODULE_PATHNAME string in SQL files. The implication for loading extension dynamic modules1 differs from the existing behavior as follows:

If the name is an absolute path, the given file is loaded. If the name does not contain a directory part, the file is searched for in the in the lib subdirectory of the extension’s directory ($EXTDIR/$EXTENSION/lib). Otherwise (the file was not found in the path, or it contains a non-absolute directory part), the dynamic loader will try to take the name as given, which will most likely fail. (It is unreliable to depend on the current working directory.) Use Cases

Here’s how the proposed file layout and extension_path GUC addresses the use cases that inspired this RFC.

Packager Testing

A packager who wants to run tests without modifying a PostgreSQL install would follow these steps:

Prepend a directory under the packaging install to the extension_path GUC. The resulting value would be something like $RPM_BUILD_ROOT/$(pg_config --extdir):$extdir. Install the extension into that directory: make install EXTDIR=$RPM_BUILD_ROOT Make sure the PostgreSQL server can access the directory, then run make installcheck

This will allow PostgreSQL to find and load the extension during the tests. The Postgres installation will not have been modified; only the extension_path will have changed.

OCI/Kubernetes

To allow extensions to be added to a OCI container and to persist beyond its lifetime, one or more volumes could be used. Some examples:

Mount a persistent volume for extensions and prepend the path to that directory to the extension_path GUC. Then Postgres can find any extensions installed there, and they will persist. Files for all extensions will live on a single volume. Or, to meet a desire to keep some extensions separate (e.g., open-source vs company-internal extensions), two or more persistent volumes could be mounted, as long as they’re all included in extension_path, are accessible by PostgreSQL, and users take care to install extensions in the proper locations. CNPG Extension Images

To meet the CNPG ambition to “install” an extension by mounting a single directory for each, create separate images for each extension, then use the Kubernetes image volume feature (currently in alpha) to mount each as a read-only volume in the appropriate subdirectory of a directory included in extension_path. Thereafter, any new containers would simply have to mount all the same extension image volumes to provide the same extensions to all containers.

Postgres.app

To allow extension installation without invalidating the Postgres.app bundle signature, the default configuration could prepend a well-known directory outside the app bundle, such as /Library/Application Support/Postgres, to extension_path. Users wishing to install new extensions would then need to point the EXTDIR parameter to that location, e.g.,

$ make install EXTDIR="/Library/Application Support/Postgres"`

Or the app could get trickier, setting the --extdir value to that location so that users don’t need to use EXTDIR. As long as extension_path includes both the bundle’s own extension directory and this external directory, Postgres will be able to find and load all extensions.

Extension Directory Examples

A core extension like citext would have a structure similar to:

citext ├── citext.control ├── lib │ ├── citext.dylib │ └── bitcode │ ├── citext │ │ └── citext.bc │ └── citext.index.bc └── share ├── citext--1.0--1.1.sql ├── citext--1.1--1.2.sql ├── citext--1.2--1.3.sql ├── citext--1.3--1.4.sql ├── citext--1.4--1.5.sql ├── citext--1.4.sql └── citext--1.5--1.6.sql

The subdirectory for a pure SQL extension named “pair” in a directory named “pair” that looks something like this:

pair ├── LICENSE.md ├── README.md ├── pair.control ├── doc │ ├── html │ │ └── pair.html │ └── pair.md └── share ├── pair--1.0--1.1.sql └── pair--1.1.sql

A binary application like pg_top would live in the pg_top directory, structured something like:

pg_top ├── HISTORY.rst ├── INSTALL.rst ├── LICENSE ├── README.rst ├── bin │ └── pg_top └── doc └── man └── man3 └── pg_top.3

And a C extension like semver would live in the semver directory and be structured something like:

semver ├── LICENSE ├── README.md ├── semver.control ├── doc │ └── semver.md ├── lib │ ├── semver.dylib │ └── bitcode │ ├── semver │ │ └── semver.bc │ └── semver.index.bc └── share ├── semver--1.0--1.1.sql └── semver--1.1.sql Phase Two: Preloading

The above-proposed solution does not allow shared modules distributed with extensions to compatibly be loaded via shared library preloading, because extension modules wil no longer live in the dynamic_library_path. Users can specify full paths, however. For example, instead of:

shared_preload_libraries = 'pg_partman_bgw'

One could use the path to the lib subdirectory of the extension’s directory:

shared_preload_libraries = '/opt/postgres/extensions/pg_partman_bgw/lib/pg_partman_bgw'

But users will likely find this pattern cumbersome, especially for extensions with multiple shared modules. Perhaps some special syntax could be added to specify a single extension module, such as:

shared_preload_libraries = '$extension_path::pg_partman_bgw'

But this overloads the semantics of shared_preload_libraries and the code that processes it rather heavily, not to mention the LOAD command.

Therefore, as a follow up to the solution proposed above, this RFC proposes additional changes to PostgreSQL.

Extension Preloading

Add new GUCs that complement shared library preloading, but for extension module preloading:

shared_preload_extensions session_preload_extensions local_preload_extensions

Each takes a list of extensions for which to preload shared modules. In addition, another new GUC, local_extensions, will contain a list of administrator-approved extensions users are allowed to include in local_preload_extensions. This GUC complements local_preload_libraries’s use of a plugins directory.

Then modify the preloading code to also preload these files. For each extension in a list, it would:

Search each path in extension_path for the extension. When found, load all the shared libraries from $extension/lib.

For example, to load all shared modules in the pg_partman extension, set:

shared_preload_extensions = 'pg_partman'

To load a single shared module from an extension, give its name after the extension name and two colons. This example will load only the pg_partman_bgw shared module from the pg_partman extension:

shared_preload_extensions = 'pg_partman::pg_partman_bgw'

This change requires a one-time change to existing preload configurations on upgrade.

Future: Deprecate LOAD

For a future change, consider modifying CREATE EXTENSION to support shared module-only extensions. This would allow extensions with no SQL component, such as auto_explain, to be handled like any other extension; it would live under one of the directories in extension_path with a structure like this:

auto_explain ├── auto_explain.control └── lib ├── auto_explain.dylib └── bitcode ├── auto_explain │ └── auto_explain.bc └── auto_explain.index.bc

Note the auto_explain.control file. It would need a new parameter to indicate that the extension includes no SQL files, so CREATE EXTENSION and related commands wouldn’t try to find them.

With these changes, extensions could become the primary, recommended interface for extending PostgreSQL. Perhaps the LOAD command could be deprecated, and the *_preload_libraries GUCs along with it.

Compatibility Issues The module_pathname control file variable would prefer the name of a shared module. The code that replaces the MODULE_PATHNAME string in SQL files would to strip out the $libdir/ prefix, if present. The behavior of loading dynamic modules that ship with extensions (i.e., the value of the AS part of CREATE FUNCTION) would change to look for a library name (with no directory part) in the lib subdirectory of the extension directory. The directory control file parameter and the MODULEDIR PGXS variable would be deprecated and ignored. *_preload_libraries would no longer be used to find extension modules without full paths. Administrators would have to remove module names from these GUCs and add the relevant extension names to the new *_preload_extensions variables. To ease upgrades, we might consider adding a PGXS variable that, when true, would symlink shared modules into --pkglibdr. LOAD would no longer be able to find shared modules included with extensions, unless we add a PGXS variable that, when true, would symlink shared modules into --pkglibdr. The EXTENSION PGXS variable will no longer support multiple extension names. The change in extension installation locations must also be adopted by projects that don’t use PGXS for installation, like pgrx. Or perhaps they could be modified to also use PGXS. Long term it might be useful to replace the Makefile-based PGXS with another installation system, perhaps a CLI. Out of Scope

This RFC does not include or attempt to address the following issue:

How to manage third-party shared libraries. Making system dependencies consistent in a OCI/Kubernetes environment or for non-system binary packaging patterns presents its own challenges, though they’re not specific to PostgreSQL or the patterns described here. Research is ongoing into potential solutions, and will be addressed elsewhere. Acknowledgements

A slew of PostgreSQL community members contributed feedback, asked hard questions, and suggested moderate to significant revisions to this RFC via the the pgsql-hackers list, in-person discussion at PGConf.eu, and pull request comments. I’d especially like to thank:

Yurii Rashkovskii and David Christensen for highlighting this issue at the Extension Ecosystem Summit Christoph Berg for the original patch, calling attention to the permission issues when building Debian packages, and various lists discussions Tobias Bussmann for calling attention to the immutability issues with Postgres.app Christoph Berg, Gabriele Bartolini, Peter Eisentraut, and Andres Freund for detailed discussion at PGConf.eu on extension location issues and getting to consensus on a genera approach to solving it Douglas J Hunley, Shaun Thomas, and Keith Fiske for pull request reviews and corrections Álvaro Hernández Tortosa for a very close review and ton of substantive feedback on the pull request Paul Ramsey, Tristan Partin, Ebru Aydin Gol, and Peter Eisentraut for pgsql-hackers list discussions. Tembo for supporting my work on this and many other extension-related issues

All remaining errors and omissions remain my own.

But not non-extension modules; see Phase Two and Future for further details on preloading extension modules and eventually deprecating non-extension modules. ↩︎

More about… Postgres Extensions RFC Packaging Kubernetes OCI Packaging Postgres.app

Jon Udell

The social cost of mediated experience

The first time I heard a critique of mediated experience, the critic was my dad. He was an avid photographer who, during our family’s year in India, when I was a young child, used his 35mm Exacta to capture thousands of photos that became carousels of color slides we viewed for many years thereafter. It … Continue reading The social cost of mediated experience

The first time I heard a critique of mediated experience, the critic was my dad. He was an avid photographer who, during our family’s year in India, when I was a young child, used his 35mm Exacta to capture thousands of photos that became carousels of color slides we viewed for many years thereafter. It was a remarkable documentary effort that solidified our memories of that year. But dad was aware of the tradeoff. A favorite joke became: “Q: How was your trip?” “A: I won’t know until the film is developed!” He realized that interposing a camera between himself and the people he encountered had altered the direct experience he and they would otherwise have had.

This weekend I heard Christine Rosen’s modern version of that critique in a discussion of her new book The extinction of experience: Being human in a disembodied world. I listened to the podcast on a hike, my noise-canceling Airpods insulating me from the sounds of the creek trail and from the people walking along it.

It’s complicated. When hiking alone I greatly value the ability to listen to interesting people and ideas while exercising, breathing fresh air, and moving through the natural world. The experience is embodied in one sense, disembodied in another. Reading the same material while lying on the couch would be a different, and arguably more extreme, form of disembodiment. But when I passed a family of four, all walking along looking at their phones, that felt wrong. When people are together they should actually be together, right? You’ve doubtless felt the same when seeing people in this together-but-not-together state.

Lately Pete Buttigieg has been urging us to spend less time online, more time IRL having face-to-face conversations. I think that’s right. There’s no doubt that the decline of social capital described in Robert Putnam’s Bowling Alone has accelerated in the 30 years since he wrote that book. America’s tragic polarization is a predictable outcome. Without the institutions and cultural traditions that once brought us together, face-to-face, in non-political ways, we’re all too vulnerable to being herded into competing online echo chambers that magnify our differences and erase our common humanity.

I won’t be abandoning my mediated and disembodied life online, but I do need to participate in it less and more critically, and prioritize my unmediated and embodied life IRL. The pendulum has swung too far away from the direct experience of shared reality, and that hasn’t been good for me nor for my country,

Saturday, 23. November 2024

Heres Tom with the Weather

RIP Toni Price

We made a roadtrip one last time to Wimberly to see her perform at the Devil’s Backbone Tavern in August 2023. There was no one like Toni Price.

We made a roadtrip one last time to Wimberly to see her perform at the Devil’s Backbone Tavern in August 2023.

There was no one like Toni Price.

Monday, 18. November 2024

Damien Bod

ASP.NET Core BFF using OpenID Connect and Vue.js

This article shows how to implement a secure web application using Vue.js and ASP.NET Core. The web application implements the backend for frontend security architecture (BFF) and deploys both technical stacks as one web application. HTTP only secure cookies are used to persist the session. OpenIddict is used as the identity provider and the token […]

This article shows how to implement a secure web application using Vue.js and ASP.NET Core. The web application implements the backend for frontend security architecture (BFF) and deploys both technical stacks as one web application. HTTP only secure cookies are used to persist the session. OpenIddict is used as the identity provider and the token issuer.

Code: https://github.com/damienbod/bff-aspnetcore-oidc-vuejs

Overview

The solution is deployed as a single OpenID Connect confidential client using a separate OpenIddict identity provider. The OpenID Connect client authenticates using the code flow with PKCE and a secret or a certificate. The UI part of the solution is deployed as part of the server application. Secure HTTP only cookies are used to persist the session after a successful authentication. No security flows are implemented in the client part of the application. No sensitive data like tokens are exposed in the client browser. By removing the security from the client, the security is improved and the complexity is reduced.

Setup Vue.js application

The Vue.js UI is setup so that the default development environment is used like in any Vue.js standalone application. A reverse proxy is used to integrate the application into the secure backend development environment. The UI uses Vue.js 3 with Typescript and Vite.

HTTPS setup and Production build

The production build is used to add the application as a UI view in the server rendered application, in this case ASP.NET Core. I always use HTTPS in development, so that the errors are discovered early and a strong CSP can also be used. This is all setup in the vite project file.

import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import fs from 'fs'; // https://vitejs.dev/config/ export default defineConfig({ plugins: [vue()], server: { https: { key: fs.readFileSync('./certs/dev_localhost.key'), cert: fs.readFileSync('./certs/dev_localhost.pem'), }, port: 4202, strictPort: true, // exit if port is in use hmr: { clientPort: 4202, }, }, optimizeDeps: { force: true, }, build: { outDir: "../server/wwwroot", emptyOutDir: true }, })

CSP setup

The CSP is setup to use nonces both in development and production. This will save time fixing CSP issues before you go live. Vue.js creates scripts and styles on a build or a npm dev (vite). The scripts require the nonce. The styles require a nonce in production. To add the server created nonce, the index.html file uses a meta tag in the header as well as the server rendered middleware parsing for scripts and styles. The nonce gets added and updated with a new value on every HTTP response. This can be used directly in the Vue.js code. When adding further script statically or dynamically, the nonce placeholder can be used. This gets updated dynamically in development and production environments.

<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="CSP_NONCE" content="**PLACEHOLDER_NONCE_SERVER**" /> <link rel="icon" type="image/svg+xml" href="/vite.svg" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Vite + Vue + TS</title> </head> <body> <div id="app"></div> /src/main.ts </body> </html>

The ASP.NET Core _host file is used to serve up the index.html and adds in the dynamic bits to the Vue.js application. The scripts and styles have a nonce applied in production and the scripts in the development environment. Added and replace the CSP nonce can be done in different ways and needs to match the Vue.js index.html. This can change, depending on the setup of the Vue.js index.html.

@page "/" @namespace BlazorBffAzureAD.Pages @using System.Net; @using NetEscapades.AspNetCore.SecurityHeaders; @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, NetEscapades.AspNetCore.SecurityHeaders.TagHelpers @inject IHostEnvironment hostEnvironment @inject IConfiguration config @inject Microsoft.AspNetCore.Antiforgery.IAntiforgery antiForgery @{ Layout = null; var source = ""; if (hostEnvironment.IsDevelopment()) { var httpClient = new HttpClient(); source = await httpClient.GetStringAsync($"{config["UiDevServerUrl"]}/index.html"); } else { source = System.IO.File.ReadAllText($"{System.IO.Directory.GetCurrentDirectory()}{@"/wwwroot/index.html"}"); } var nonce = HttpContext.GetNonce(); // The nonce is passed to the client through the HTML to avoid sync issues between tabs source = source.Replace("**PLACEHOLDER_NONCE_SERVER**", nonce); var nonceScript = $"<script nonce=\"{nonce}\" type="; source = source.Replace("<script type=", nonceScript); // link rel="stylesheet" var nonceLinkStyle = $"<link nonce=\"{nonce}\" rel=\"stylesheet"; source = source.Replace("<link rel=\"stylesheet", nonceLinkStyle); var xsrf = antiForgery.GetAndStoreTokens(HttpContext); var requestToken = xsrf.RequestToken; // The XSRF-Tokens are passed to the client through cookies, since we always want the most up-to-date cookies across all tabs Response.Cookies.Append("XSRF-RequestToken", requestToken ?? "", new CookieOptions() { HttpOnly = false, IsEssential = true, Secure = true, SameSite = SameSiteMode.Strict }); } @Html.Raw(source) Anti-forgery protection

Cookies are used to store the session authentication. The authentication cookie is a HTTP only secure cookie only for its domain. Browser Same Site protection helps secure the session. Old browsers do not support Same Site and Anti-forgery protection is still required. You can add this protection in two ways. I use a CSRF anti-forgery cookie. You could also use custom headers with validation. The getCookie script gets the anti-forgery cookie which was created by the server. This cookie is not HTTP only because it needs to be read into the UI.

export const getCookie = (cookieName: string) => { const name = `${cookieName}=`; const decodedCookie = decodeURIComponent(document.cookie); const ca = decodedCookie.split(";"); for (let i = 0; i < ca.length; i += 1) { let c = ca[i]; while (c.charAt(0) === " ") { c = c.substring(1); } if (c.indexOf(name) === 0) { return c.substring(name.length, c.length); } } return ""; };

The Anti-forgery header is added to every API call which requires this. I use axios to request API data, and the header needs to be added to the axiosConfig. For the demo, I just implemented this directly the Vue js component. The component makes various API calls.

<script setup lang="ts"> import ResultsDisplay from './ResultsDisplay.vue' import axios from 'axios'; import { ref, onMounted } from 'vue' import { getCookie } from '../getCookie'; const isLoggedIn = ref<boolean>() const currentUser = ref<any>() const jsonResponse = ref<any>() onMounted(() => { getUserProfile() }) const axiosConfig = { headers:{ 'X-XSRF-TOKEN': getCookie('XSRF-RequestToken'), } }; // request.headers.set('X-XSRF-TOKEN', getCookie('XSRF-RequestToken')); function getDirectApi() { axios.get(`${getCurrentHost()}/api/DirectApi`, axiosConfig) .then((response: any) => { jsonResponse.value = response.data; return response.data; }) .catch((error: any) => { alert(error); }); } function getUserProfile() { axios.get(`${getCurrentHost()}/api/User`) .then((response: any) => { console.log(response); jsonResponse.value = response.data; if(response.data.isAuthenticated){ isLoggedIn.value = true; currentUser.value = response.data.claims[0].value } return response.data; }) .catch((error: any) => { alert(error); }); } function getCurrentHost() { const host = window.location.host; const url = `${window.location.protocol}//${host}`; return url; } </script> <template> <div class='home'> <a class="btn" href="api/Account/Login" v-if='!isLoggedIn'>Log in</a> <div v-if='isLoggedIn'> <form method="post" action="api/Account/Logout"> <button class="btn btn-link" type="submit">Sign out</button> </form> </div> <button v-if='isLoggedIn' class='btn' @click='getUserProfile' >Get Profile data</button> <button v-if='isLoggedIn' class='btn' @click='getDirectApi' >Get API data</button> <ResultsDisplay v-if='isLoggedIn' v-bind:currentUser='currentUser' v-bind:jsonResponse='jsonResponse' /> </div> <p class="read-the-docs">BFF using ASP.NET Core and Vue.js</p> </template> <style scoped> .read-the-docs { color: #888; } </style>

Setup ASP.NET Core application

The ASP.NET Core project is setup to host the static html file from Vue.js and respond to all HTTP requests as defined using the APIs. The nonce is added to the index.html file. The standard ASP.NET Core OpenID Connect handler is used to authenticate the user and the application. The session is stored in a cookie. The NetEscapades.AspNetCore.SecurityHeaders Nuget package is used to add the security headers and the CSP.

using BffOidc.Server; using BffOidc.Server.Services; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.OpenIdConnect; using Microsoft.AspNetCore.Mvc; using Microsoft.IdentityModel.JsonWebTokens; using Microsoft.IdentityModel.Logging; using Microsoft.IdentityModel.Protocols.OpenIdConnect; using Microsoft.IdentityModel.Tokens; using NetEscapades.AspNetCore.SecurityHeaders.Infrastructure; var builder = WebApplication.CreateBuilder(args); builder.WebHost.ConfigureKestrel(serverOptions => { serverOptions.AddServerHeader = false; }); var services = builder.Services; var configuration = builder.Configuration; services.AddSecurityHeaderPolicies() .SetPolicySelector((PolicySelectorContext ctx) => { return SecurityHeadersDefinitions.GetHeaderPolicyCollection(builder.Environment.IsDevelopment(), configuration["OpenIDConnectSettings:Authority"]); }); services.AddAntiforgery(options => { options.HeaderName = "X-XSRF-TOKEN"; options.Cookie.Name = "__Host-X-XSRF-TOKEN"; options.Cookie.SameSite = SameSiteMode.Strict; options.Cookie.SecurePolicy = CookieSecurePolicy.Always; }); services.AddHttpClient(); services.AddOptions(); services.AddAuthentication(options => { options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; }) .AddCookie() .AddOpenIdConnect(options => { var oidcConfig = builder.Configuration.GetSection("OpenIDConnectSettings"); options.Authority = oidcConfig["Authority"]; options.ClientId = oidcConfig["ClientId"]; options.ClientSecret = oidcConfig["ClientSecret"]; options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.ResponseType = OpenIdConnectResponseType.Code; options.SaveTokens = true; options.GetClaimsFromUserInfoEndpoint = true; options.MapInboundClaims = false; options.TokenValidationParameters.NameClaimType = JwtRegisteredClaimNames.Name; }); services.AddControllersWithViews(options => options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute())); services.AddRazorPages().AddMvcOptions(options => { //var policy = new AuthorizationPolicyBuilder() // .RequireAuthenticatedUser() // .Build(); //options.Filters.Add(new AuthorizeFilter(policy)); }); builder.Services.AddReverseProxy() .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy")); var app = builder.Build(); //IdentityModelEventSource.ShowPII = true; JsonWebTokenHandler.DefaultInboundClaimTypeMap.Clear(); if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseWebAssemblyDebugging(); } else { app.UseExceptionHandler("/Error"); } app.UseSecurityHeaders(); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseRouting(); app.UseNoUnauthorizedRedirect("/api"); app.UseAuthorization(); app.MapRazorPages(); app.MapControllers(); app.MapNotFound("/api/{**segment}"); if (app.Environment.IsDevelopment()) { var uiDevServer = app.Configuration.GetValue<string>("UiDevServerUrl"); if (!string.IsNullOrEmpty(uiDevServer)) { app.MapReverseProxy(); } } app.MapFallbackToPage("/_Host"); app.Run();

Development environment

Developers require a professional development setup and should use the technical stacks like the creators of the technical stacks recommend. Default development environments is the aim and always the easiest to maintain. The Vue.js project uses a default vite environment or best practices as the Vue.js community recommends. The server part of the application must proxy all UI requests to the Vue.js development environment. I use Microsoft YARP reverse proxy to implement this. This is only required for development in this setup. Some flavors of the BFF use proxies in the production environments as well.

Testing and running

The appsettings.json MUST be updated with your OpenIddict server configuration values. If using a client secret, store this in the user secrets for development, or in a key vault when deployed to Azure.

"OpenIDConnectSettings": { "Authority": "https://localhost:44318", "ClientId": "oidc-pkce-confidential", "ClientSecret": "oidc-pkce-confidential_secret" }, Debugging

Start the Vue.js project from the ui folder

npm start

Start the ASP.NET Core project from the server folder

dotnet run

When the localhost of the server app is opened, you can authenticate and use.

Notes

I was not able to apply the nonce to the dev environment styles of the Vue.js part. This would be of great benefit as you can prevent insecure styles in development and not discover these problems after a deployment. In the production build, the nonce is applied correctly.

Links:

https://vuejs.org/

https://vitejs.dev/

https://github.com/vuejs/create-vue

https://documentation.openiddict.com/

https://www.koderhq.com/tutorial/vue/vite/

https://github.com/damienbod/bff-aspnetcore-angular

https://github.com/damienbod/bff-openiddict-aspnetcore-angular

https://github.com/damienbod/bff-aspnetcore-vuejs

Friday, 15. November 2024

Werdmüller on Medium

What I want from Mozilla

A people-first, safe, independent web. Continue reading on Medium »

A people-first, safe, independent web.

Continue reading on Medium »

Thursday, 14. November 2024

Just a Theory

Bye Twitter

I finally deleted all my Twitter accounts, notably @theory. If you see that username, it’s not me.

I quit Twitter in November 2022, when it became clear that Phony Stark would take control of the company. No regrets; I’ve been active on Mastodon since then, via Ivory, where I’ve enjoyed the Twitter ca. 2010 vibe.

But I hadn’t deleted my Tweets or my accounts until this week. The change was finally triggered by the latest announcement:

On Friday, X will adopt a new terms of service policy that for the first time explicitly says all users agree to let their posts be used to train artificial intelligence, like the company’s generative AI service, Grok. Currently, X users can go to the site’s settings and opt out.

I have no interest in feeding Grok or any other large language model. So this week I deleted all my tweets and then my accounts. I tried to transfer my personal username to a new, empty account, but in the second between changing it and switching to another tab to take it, it was somehow acquired by an account created in 2011 with no posts. Not sure how that worked. Pretty scummy.

So, just to be clear, anyone using these usernames on Twitter are not me anymore:

@theory @lunar_theory @DesignScene @pgxn

See you on Mastodon — or perhaps Bluesky.

More about… Twitter Personal

Patrick Breyer

Ein Jahr Absage an die Chatkontrolle

Heute vor einem Jahr haben wir im Ausschuss für bürgerliche Freiheiten, Justiz und Inneres (LIBE) des EU-Parlaments eine fraktionsübergreifende Position gegen anlasslose Chatkontrolle beschlossen. Damit haben wir den wahnwitzigen Überwachungsplänen …

Heute vor einem Jahr haben wir im Ausschuss für bürgerliche Freiheiten, Justiz und Inneres (LIBE) des EU-Parlaments eine fraktionsübergreifende Position gegen anlasslose Chatkontrolle beschlossen. Damit haben wir den wahnwitzigen Überwachungsplänen eine Absage erteilt, welche die von der Leyen-EU-Kommission vorgelegt hat.

Neben dem Europäischen Parlament müssen die EU-Regierungen im Rat eine Position zu dem Gesetzentwurf beschließen. Schon drei Mal wurde die notwendige Mehrheit dort verfehlt. Sowohl die spanische Ratspräsidentschaft im Oktober 2023 als auch der belgische Vorsitz im Juni 2024 haben die Abstimmung über die Chatkontrolle kurzfristig von der Tagesordnung des Rats der EU genommen, als sich ein Scheitern bei der Abstimmung abgezeichnet hat – ein Riesenerfolg der Zivilgesellschaft.

Die Europäische Kommission wird gerade neu gebildet. Bisher tat EU-Innenkommissarin Ylva Johansson (S&D, Schweden) als Mutter der Chatkontrolle alles, um ihr Vorhaben durchzuprügeln. Nun soll Magnus Brunner (EVP, Österreich) auf sie im Amt folgen und das Projekt weiterführen. Er hat in seinem Anhörungsverfahren gegenüber dem Europäischen Parlament auf die Frage der Piratin Markéta Gregorová schon signalisiert, dass er die Verhandlungen zur Chatkontrolle zum Abschluss bringen will. Ein Bekenntnis zum Schutz vor flächendeckender Chatkontrolle oder Schutz sicherer Verschlüsselung kam ihm nicht über die Lippen. Das ist ein Fehler: die EU-Kommission muss sich endgültig von Massenüberwachung verabschieden. Die anlasslose Chatkontrolle muss vom Tisch!

Im Europaparlament habe ich mich als euer Abgeordneter der Piratenpartei Deutschland federführend in den Verhandlungen eingesetzt, um die Chatkontrolle zu verhindern und auch die Abgeordneten der anderen Fraktionen in unzähligen Beratungen davon überzeugt. Heute trägt Markéta Gregorová für die europäischen Piraten die Fackel der Digitalen Freiheitskämpfer*innen im Europäischen Parlament weiter und setzt sich dort gegen die Chatkontrolle ein.

Im Rat der EU konnten wir bisher nur dank des unermüdlichen Engagements und des lautstarken Protests der Zivilgesellschaft totalitäre flächendeckende Chatkontrollen verhindern. Möglich war das dank jeder Aktivistin und jedem Einzelnen, die sich telefonisch, per E-Mail oder per Brief immer wieder an Politik und Regierung gewendet haben. Danke für euren Einsatz! Wir müssen stark bleiben und auch bei jedem weiteren Anlauf gegen die extreme und weltweit einzigartige Bedrohung des digitalen Briefgeheimnisses und sicherer Verschlüsselung durch die Chatkontrolle kämpfen!

Themenseite Chatkontrolle: chatkontrolle.de

Monday, 11. November 2024

Hyperonomy Digital Identity Lab

Web 7.0 / TDW Decentralized Identifier (DID Method) Clusters Model 0.1: Specification Development Framework

Copyright (c) 2018-2024 Michael Herman (Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public Licensehttps://creativecommons.org/licenses/by-sa/4.0/legalcode To learn how to join the did-methods DIF Working Group, click https://github.com/decentralized-identity/did-methods. 0. Prime Objective/Directive #Chickens, #Eggs, and #Roosters: A #NorthStar for the Global Decent

Copyright (c) 2018-2024 Michael Herman (Alberta, Canada) – Creative Commons Attribution-ShareAlike 4.0 International Public License
https://creativecommons.org/licenses/by-sa/4.0/legalcode

To learn how to join the did-methods DIF Working Group, click https://github.com/decentralized-identity/did-methods.

0. Prime Objective/Directive

#Chickens, #Eggs, and #Roosters: A #NorthStar for the Global Decentralized Systems Community (#GDSC)

Byline: #meggDLs, #Seleggtive #Disclosure, #DEGGCOMM, and #Eggports

The entire digital identity ecosystem is missing out on the #BigOpportunity by not focusing on the right catalyst for the #massiveadoption of #digitalcredentials.
Morphing the chicken and egg mental model: If Hens are the Issuers, Roosters the Verifiers, and Eggs are the digital credentials, the prime objective needs to be increasing the demand for and consumption of Eggs by Holders …creating hundreds of thousands of ways that drive more Holders to consume more Eggs. Think about it.

… are great examples of driving the demand for and consumption of more and more digital credentials [and DIDs] (eggs); and secondarily, the demand for hens and roosters (Issuers and Verifiers). The demand for eggs drives the production of hens; and in turn, the demand for roosters. Don’t mess with #MotherNature

Reference: https://www.linkedin.com/posts/mwherman_the-classic-chicken-and-egg-problem-verifiers-activity-7249162946709241856-lxaS?utm_source=share&utm_medium=member_desktop

1. Decentralized Identifiers (DIDs) v1.0 Specification

Reference: https://www.w3.org/TR/did-core/

Decentralized identifiers (DIDs) are a new type of identifier that enables verifiable, decentralized digital identity. A DID refers to any subject (e.g., a person, organization, thing, data model, abstract entity, etc.) as determined by the controller of the DID. In contrast to typical, federated identifiers, DIDs have been designed so that they may be decoupled from centralized registries, identity providers, and certificate authorities.

DID subject
The entity identified by a DID and described by a DID document. Anything can be a DID subject: person, group, organization, physical thing, digital thing, logical thing, etc.

2. Use Cases and Requirements for Decentralized Identifiers Document

Reference: https://www.w3.org/TR/did-use-cases/#uc

3. Subsidiary Ledgers / Digital Wallets 4. Trusted Digital Web (TDW) 5. LinkedIn Economic Graph

Reference: https://www.youtube.com/watch?v=xwawTzMfHic&list=PLU-rWqHm5p45dzXF2LJZjuNVJrOUR6DaD&index=23

6. Toronto Musican’s Economic Graph 7. #Graphitization: Amazon’s Principles, Core Entities, and Relationships 8. Enteprise Architecture 9. What Happens When You Don’t Think You Need a Taxonomy? 10. NEON NATION / Web 7.0 / TDW Conceptual Architecture 11. Web 7.0 / TDW DID Method Clusters Model 0.1

GitHub: https://github.com/decentralized-identity/did-methods/issues/3

Universal DID Methods

DID methods suitable for interacting with Every Little Thing (#ELT) on the planet/in the universe:

did:object (http://didobject.directory) did:ns (http://didns.directory) did:web7 Web 7.0/TDW DID Method Clusters Model Taxonomy 0.1 A bold method is the model method or exemplar for the particular cluster (cell). A method can be a exemplar for 1 or many clusters. This list of DID method categories is just an example. A complete taxonomy will likely be a 2-3 level hierarchy. The parent categories for these examples might include: Live Things, Inanimate Things, Abstract Things, Digital Things, Business Things, etc. etc. More than one exemplar per cluster is permitted. 12. Process Framework: Sociocracy

Reference: https://github.com/decentralized-identity/did-methods/issues/4

In Sociocracy terminology, a mini-WG is called a circle. Each category of DID methods (cluster of DID Methods) would be managed by its own independent circle. A circle member can belong to more than 1 circle. Circles are connected to a parent circle for administrative purposes. The parent circle would correspond to the DID Method WG (co-chaired by Markus).

Sociocracy: https://www.sociocracyforall.org/content/

Sociocracy combines consent decision-making, a decentralized system of authority and intentional processes to improve our decisions and processes over time into a governance system that supports effective and efficient process while increasing connection, listening and co-creation among members.

Sociocracy is used in businesses, communities, nonprofits, cooperatives, grassroots groups and in education. 

13. Trusted Digital Web (TDW) Glossary/Taxonomy Model: Erin Buys a Car Neighborhood 14. Questions

Friday, 08. November 2024

Heres Tom with the Weather

Webfinger in the Wild

Today, a post in my feed included a mention and its webfinger verification threw a WebFinger::BadRequest exception: Nov 08 09:18:49 AM WebFinger::BadRequest (Bad Request): Nov 08 09:18:49 AM Nov 08 09:18:49 AM app/models/account.rb:79:in `fetch_and_create_mastodon_account' Nov 08 09:18:49 AM app/models/account.rb:367:in `block in create_status!' Nov 08 09:18:49 AM app/models/account.rb:36

Today, a post in my feed included a mention and its webfinger verification threw a WebFinger::BadRequest exception:

Nov 08 09:18:49 AM WebFinger::BadRequest (Bad Request): Nov 08 09:18:49 AM Nov 08 09:18:49 AM app/models/account.rb:79:in `fetch_and_create_mastodon_account' Nov 08 09:18:49 AM app/models/account.rb:367:in `block in create_status!' Nov 08 09:18:49 AM app/models/account.rb:364:in `each' Nov 08 09:18:49 AM app/models/account.rb:364:in `create_status!' Nov 08 09:18:49 AM app/lib/activity_pub/activity/create.rb:20:in `perform' Nov 08 09:18:49 AM app/controllers/accounts_controller.rb:148:in `process_item' Nov 08 09:18:49 AM app/controllers/accounts_controller.rb:75:in `inbox'

The activitypub actor document resided on mastodon.well.com but when a reverse discovery was performed, the hostname of the subject in the webfinger response was well.com instead of mastodon.well.com. Making a webfinger request to well.com for the mentioned user returned a 500 Internal Server Error so a WebFinger::BadRequest exception was thrown. What was going on?

Fortunately, an issue in the activitypub-webfinger had the answer:

Looks like some are using this host-meta redirect to use a custom domain for actors which is different to the actual domain of the server.

And that is what was happening:

curl https://mastodon.well.com/.well-known/host-meta <?xml version="1.0" encoding="UTF-8"?> <XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0"> <Link rel="lrdd" template="https://mastodon.well.com/.well-known/webfinger?resource={uri}"/> </XRD>

A response in the issue notes

The use of host-meta as a “second layer of indirection” is something that mostly a holdover from the OStatus days, IIRC. Most projects that aren’t Mastodon or Pleroma will not check host-meta at all, and will instead always skip straight to the /.well-known/webfinger endpoint. I don’t think it makes sense to unnecessarily pressure everyone into adopting host-meta or supporting variable LRDD endpoints

I can’t argue with that so I just handled the exception without setting the custom domain.


Phil Windleys Technometria

Internet Identity Workshop XXXIX Report

The 39th edition of the Internet Identity Workshop wrapped up last week.

The 39th edition of the Internet Identity Workshop wrapped up last week. We have 364 attendees from around the world who called 178 sessions. I can't begin to describe the energy of the identity community when they all get together to discuss their favorite topics. If you like identity, or simply want to be part of an enthusiastic technical community, you should come to IIW.

As you can see by the pins in the map at the top of this post, there were attendees from all over the world. Not surprisingly, most of the attendees were from the US (251), followed by Canada (18) and France (14). Germany, Japan, and Australia rounded out the top six with 12, 9, and 7 attendees respectively. Attendees from India (5), Columbia (3), and Chile (2) show IIW's geographic diversity. Sadly, there were no attendees from Africa again. Please remember we offer scholarships for people from underrepresented areas, so if you'd like to come to IIW40, please let us know. If you're working on identity, we want you there.

For states and provinces, California was first with 131 attendees. Washington (19), Utah (14), New York (9), and Massachusetts (9) made up the rest of the top 5. San Jose (20), San Francisco (16), Paris (12), Oakland (11), and Seattle (9) were the top five cities.

We'll have the book of proceedings out in a month or so with notes from the different sessions and descriptions of the 20 demos given during demo hour. Past proceedings are available here.

The next IIW takes place April 8-10, 2025 at the Computer History Museum. This will be IIW XL, number 40! We'll have registration open the first part of December. If you're interested in sponsoring, send me a note.

Subscribe now

Share

Thursday, 07. November 2024

Werdmüller on Medium

A hypothesis about the Democrats

Have they been culturally outmaneuvered? Continue reading on Medium »

Have they been culturally outmaneuvered?

Continue reading on Medium »

Wednesday, 06. November 2024

Heres Tom with the Weather

Indieweb Meetup Austin today

After some time off IndieWeb Meetup Austin is back at Mozart’s Coffee tonight at 7pm. I guess a few things have transpired since the last meeting so I’m looking forward to learning about what’s going on again.

After some time off IndieWeb Meetup Austin is back at Mozart’s Coffee tonight at 7pm. I guess a few things have transpired since the last meeting so I’m looking forward to learning about what’s going on again.

Monday, 04. November 2024

Just a Theory

Introducing RFC 9535 Go JSONPath and Playground

I’ve made a RFC 9535 JSONPath JSONPath Go package, and compiled it into Wasm to build an in-browser playground for it.

I’ve written and release a RFC 9535 JSONPath JSONPath Go package, github.com/theory/jsonpath. Why? For a personal project, I needed a simpler JSONPath engine to complement to the Go SQL/JSON Path package, and quickly found myself implementing most of the RFC. So I decided do the whole thing.

Yes, yet another JSONPath package in Go. I really appreciate the idea of a standard — plus its support for features not included in the original design from 2007, such as object slices! But I could find no reference to the RFC on pkg.go.dev. Today the search shows one!

Example

Usage is straightforward; here’s a quick example (Go playground):

package main import ( "fmt" "log" "github.com/theory/jsonpath" ) func main() { // Parse a jsonpath query. p, err := jsonpath.Parse(`$["name", "slogan"]`) if err != nil { log.Fatal(err) } // Select values from unmarshaled JSON input. json := map[string]any{ "name": "Kamala Harris", "title": "Vice President of the United States", "home": "California", "slogan": "We are not going back!", } items := p.Select(json) // Show the result. fmt.Printf("%#v\n", items) }

And the output:

[]interface {}{"Kamala Harris", "We are not going back!"} 🛝 Playground

No need to write code to try it out, though. I’ve also written a playground webapp to encourage experimentation and exploration of the syntax and behavior of the package. The implementation follows the precedents set by the Go SQL/JSON Playground and design of the Rust JSONPath Playground. Moreover, thanks to TinyGo, the Wasm file comes in at a mere 254K!

The webapp loads sample JSON from the RFC, and randomly rotates through a few example JSONPath queries. Fill in your own and tap the “Permalink” button to share links. The Playground is a stateless JavaScript/Wasm web application: data persists only in permalink URLs.1

🛝 Try this example Playground permalink right now!

Status

The root jsonpath package is stable and ready for use. Other packages remain in flux, as I refactor and rejigger things in the coming weeks as part of the aforementioned personal project. But for actual JSONPath execution and querying, it should continue to work as-is for the foreseeable future.

I hope you find it useful.

And whatever data [GitHub Pages collect] 😔. ↩︎

More about… Go JSONPath Playground RFC 9535

NYTimes Tech Guild on Strike

My former colleagues in the New York Times Tech Guild have gone on strike in response to a number of unfair labor practice violations and management’s inability to bargain in good faith.

This is a big deal. My former colleagues in the New York Times Tech Guild have declared a strike today in response to a number of unfair labor practice violations and management’s inability to bargain in good faith. From the Washington Post:

Represented by the NewsGuild of New York, the Tech Guild has been negotiating its first contract with the company since 2022. Both sides have accused the other side of bogging down contract talks, which have recently focused on three key issues: “just cause” job protections (which ensure employees can’t be fired without reason and due process), remote work and pay equity. Unit members voted overwhelmingly in September to authorize the strike, saying the timing of the authorization — in the run-up to the high-profile election period — was “no accident.”

I urge you to join me in supporting the strike fund, which will help more vulnerable members to weather the strike.

Beyond that, the Guild asks supporters to refrain from interacting with Cooking and Games, and to break your streaks. Times reporters Maggie Astor has the details:

As of this morning, the New York Times Tech Guild, which represents NYT tech workers, is on strike.

Unless it’s resolved while today’s Wordle is still live, this streak is gone.

NYT Games and Cooking are BEHIND THE PICKET LINE. Please don’t play or engage with Games or Cooking content while the strike lasts!

News coverage is NOT behind the picket line. It’s okay to read and share that, though the site and app may have problems.

Read the whole thread for more information, which, as she says, “the rules may not be what you think!”

More about… New York Times Strike News Guild New York Times Tech Guild

Michael Ruminer

Agents Craft Hackathon and Inspiration Block

When you want to do a hackathon but am missing the perfect idea. Compliments of Flux.1 Schnell You likely know the saying, “Don’t let the perfect be the enemy of the good/done.” Sometimes, I have a hard time living that, and an existing effort is one example. I have registered for an AI agent hackathon, Agents Craft Hackathon. I don’t plan to be competitive but I doubt that is the goal o
When you want to do a hackathon but am missing the perfect idea. Compliments of Flux.1 Schnell

You likely know the saying, “Don’t let the perfect be the enemy of the good/done.” Sometimes, I have a hard time living that, and an existing effort is one example. I have registered for an AI agent hackathon, Agents Craft Hackathon. I don’t plan to be competitive but I doubt that is the goal of most participants. I do want a good idea that makes a great example and is a pseudo-novel idea that implements an agent usage not in the GenAI_Agents Github repo. Therein lies my problem; a unique and interesting use case and example. I’m inspiration-blocked. I know that I am letting the perfect be the enemy of the good or even of the enemy of the fun because there is a Discord channel with participant-created ideas for teams to work on. I want it simple yet inspired. I’m not inspired by any of the existing team projects; nothing against the projects as this is a me problem. I have a few more days to think about it.

Maybe you should join the hackathon. Your idea might be inspiring.


Aaron Parecki

My IETF 121 Agenda

Here's where you can find me at IETF 121 in Dublin!

Here's where you can find me at IETF 121 in Dublin!

Monday 9:30 - 11:30 • oauth 15:30 - 17:00 • alldispatch Tuesday 9:30 - 11:30 • oauth 13:00 - 14:30 • spice 16:30 - 17:30 • scim Thursday 9:30 - 11:30 • oauth Get in Touch LinkedIn GitHub Mastodon aaron@parecki.com My Current Drafts OAuth 2.1 OAuth for Browser-Based Apps OAuth Protected Resource Metadata OAuth for First-Party Apps OAuth Client ID Metadata Document Identity Assertion Authorization Grant OAuth Global Token Revocation

Damien Bod

ASP.NET Core and Angular BFF using a YARP downstream API protected using certificate authentication

This article demonstrates how to implement a downstream API protected by certificate authentication using Microsoft YARP reverse proxy in an ASP.NET Core web application. The application uses Angular for its UI and secures both the UI and the ASP.NET Core backend through a backend-for-frontend security architecture. The downstream API is secured with certificate authentication and […]

This article demonstrates how to implement a downstream API protected by certificate authentication using Microsoft YARP reverse proxy in an ASP.NET Core web application. The application uses Angular for its UI and secures both the UI and the ASP.NET Core backend through a backend-for-frontend security architecture. The downstream API is secured with certificate authentication and deployed to an Azure App Service. The API requires a known client certificate for access.

Code https://github.com/damienbod/bff-aspnetcore-angular-downstream-cert-api

Setup

The application was built using the following github repository:

https://github.com/damienbod/bff-aspnetcore-angular

The web application is secured with an OpenID Connect confidential client using PKCE. The UI is built with Angular , while the backend is implemented using ASP.NET Core. The API is protected with certificate authentication. This application is deployed to an Azure App Service and requires the correct certificate for access. The server ensures that the correct certificate is used to access the API.

The YARP reverse proxy is setup in the start up of the ASP.NET Core application and the appsettings.json file. The client certificate required for the downstream API, is loaded into the project using the X509Certificate2 class. This could be loaded from the operating system, or Azure key vault or some other secure way. The demo loads this directly in an unsecure way.

The AddReverseProxy method adds the YARP definitions and the ConfigureHttpClient method is used to add the SslOptions containing the client certificate which is used for the Azure API calls. The MapReverseProxy is used to add the endpoints and reads the configuration from the app settings. The proxy is also used in development to load the Angular project. Depending on the UI packages, different setups are required.

var builder = WebApplication.CreateBuilder(args); builder.WebHost.ConfigureKestrel(serverOptions => { serverOptions.AddServerHeader = false; }); var services = builder.Services; var configuration = builder.Configuration; var stsServer = configuration["OpenIDConnectSettings:Authority"]; services.AddSecurityHeaderPolicies() .SetPolicySelector((PolicySelectorContext ctx) => { return SecurityHeadersDefinitions.GetHeaderPolicyCollection( builder.Environment.IsDevelopment(), stsServer); }); services.AddAntiforgery(options => { options.HeaderName = "X-XSRF-TOKEN"; options.Cookie.Name = "__Host-X-XSRF-TOKEN"; options.Cookie.SameSite = SameSiteMode.Strict; options.Cookie.SecurePolicy = CookieSecurePolicy.Always; }); services.AddHttpClient(); services.AddOptions(); services.AddAuthentication(options => { options.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.DefaultChallengeScheme = OpenIdConnectDefaults.AuthenticationScheme; }) .AddCookie() .AddOpenIdConnect(options => { configuration.GetSection("OpenIDConnectSettings").Bind(options); //options.Authority = configuration["OpenIDConnectSettings:Authority"]; //options.ClientId = configuration["OpenIDConnectSettings:ClientId"]; //options.ClientSecret = configuration["OpenIDConnectSettings:ClientSecret"]; options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme; options.ResponseType = OpenIdConnectResponseType.Code; options.SaveTokens = true; options.GetClaimsFromUserInfoEndpoint = true; options.TokenValidationParameters = new TokenValidationParameters { NameClaimType = "name" }; }); services.AddControllersWithViews(options => options.Filters.Add(new AutoValidateAntiforgeryTokenAttribute())); services.AddRazorPages().AddMvcOptions(options => { //var policy = new AuthorizationPolicyBuilder() // .RequireAuthenticatedUser() // .Build(); //options.Filters.Add(new AuthorizeFilter(policy)); }); builder.Services.AddSingleton<ApiTokenCacheClient>(); // Create an authorization policy used by YARP when forwarding requests builder.Services.AddAuthorization(options => options.AddPolicy("CookieAuthenticationPolicy", builder => { builder.AddAuthenticationSchemes(CookieAuthenticationDefaults.AuthenticationScheme); builder.RequireAuthenticatedUser(); })); var cert = new X509Certificate2("client.pfx", "pfx-certificate-secret"); services.AddReverseProxy() .ConfigureHttpClient((context, handler) => { handler.SslOptions = new SslClientAuthenticationOptions { ClientCertificates = [cert] }; }) .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy"));

The ReverseProxy settings adds the configuration which is almost standard like the documentation. The CookieAuthenticationPolicy is used to accept only authenticated requests. The YARP is setup differently for development and production.

"ReverseProxy": { "Routes": { "route1": { "ClusterId": "cluster1", "AuthorizationPolicy": "CookieAuthenticationPolicy", "Match": { "Path": "{**catch-all}" } } }, "Clusters": { "cluster1": { "HttpClient": { "SslProtocols": [ "Tls12" ] }, "Destinations": { "cluster1/destination1": { "Address": "https://azurecertauth20201108214641.azurewebsites.net/" } } } } }

Downstream API protected using certificate authentication

The downstream API uses certification authentication to protect the API. The API requires a certificate forwarding middleware in local development as well as allowing any certificate type including self signed certificates. When the application is deployed to an Azure App Service, the certificate forwarding middleware is not required. The API validates the thumbprint of the certificate and returns a 403 if the certificate authentication in ASP.NET Core fails. This is because the certificate is already validated before it reaches the application. It is really authorization.

using Microsoft.AspNetCore.Authentication.Certificate; using Microsoft.AspNetCore.Server.Kestrel.Https; using Microsoft.IdentityModel.JsonWebTokens; using Microsoft.IdentityModel.Logging; using Serilog; using System.Security.Claims; using System.Security.Cryptography.X509Certificates; namespace DownstreamApiCertAuth; internal static class StartupExtensions { public static WebApplication ConfigureServices(this WebApplicationBuilder builder) { var services = builder.Services; var configuration = builder.Configuration; if(builder.Environment.IsDevelopment()) { builder.WebHost.ConfigureKestrel((context, serverOptions) => { serverOptions.ConfigureHttpsDefaults(listenOptions => { listenOptions.ClientCertificateMode = ClientCertificateMode.RequireCertificate; listenOptions.AllowAnyClientCertificate(); }); }); } services.AddSingleton<MyCertificateValidationService>(); services.AddCertificateForwarding(options => { options.CertificateHeader = "X-ARR-ClientCert"; options.HeaderConverter = (headerValue) => { Console.WriteLine("headerValue: " + headerValue); X509Certificate2? clientCertificate = null; if (!string.IsNullOrWhiteSpace(headerValue)) { byte[] bytes = Convert.FromBase64String(headerValue); clientCertificate = new X509Certificate2(bytes); } return clientCertificate!; }; }); services.AddAuthentication(CertificateAuthenticationDefaults.AuthenticationScheme) .AddCertificate(options => // code from ASP.NET Core sample { // https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth options.AllowedCertificateTypes = CertificateTypes.All; // Default values //options.AllowedCertificateTypes = CertificateTypes.Chained; //options.RevocationFlag = X509RevocationFlag.ExcludeRoot; options.RevocationMode = X509RevocationMode.NoCheck; options.ValidateCertificateUse = false; options.ValidateValidityPeriod = false; options.Events = new CertificateAuthenticationEvents { OnCertificateValidated = context => { var validationService = context.HttpContext.RequestServices.GetService<MyCertificateValidationService>(); if (validationService!.ValidateCertificate(context.ClientCertificate)) { var claims = new[] { new Claim(ClaimTypes.NameIdentifier, context.ClientCertificate.Subject, ClaimValueTypes.String, context.Options.ClaimsIssuer), new Claim(ClaimTypes.Name, context.ClientCertificate.Subject, ClaimValueTypes.String, context.Options.ClaimsIssuer) }; context.Principal = new ClaimsPrincipal(new ClaimsIdentity(claims, context.Scheme.Name)); context.Success(); } else { context.Fail("invalid cert"); } return Task.CompletedTask; }, OnAuthenticationFailed = new Func<CertificateAuthenticationFailedContext, Task>(context => { Console.WriteLine("OnAuthenticationFailed: " + context.Exception.Message); return Task.CompletedTask; }) }; }); services.AddAuthorization(); services.AddControllers(); return builder.Build(); } public static WebApplication ConfigurePipeline(this WebApplication app) { IdentityModelEventSource.ShowPII = true; JsonWebTokenHandler.DefaultInboundClaimTypeMap.Clear(); app.UseSerilogRequestLogging(); if (app.Environment.IsDevelopment()) { app.UseDeveloperExceptionPage(); } app.UseHttpsRedirection(); app.UseRouting(); if (app.Environment.IsDevelopment()) { app.UseCertificateForwarding(); } app.UseAuthentication(); app.UseAuthorization(); app.MapControllers(); return app; } }

When the application is started, the web application can use the downstream API protected using certificates.

Notes

This works good and the downstream APIs can be protected in a secure way using certificates. Using this approach, it is very easy to increase security or implement the app-to-app security in a good way. Of course security is only as good as the weakest link. The Angular UI view calling to the API protected with cookies is now the weakest link, depending of course on how you secure the downstream APIs, but this should not be a problem to do correctly.

Links

https://github.com/microsoft/reverse-proxy

https://github.com/damienbod/Blazor.BFF.OpenIDConnect.Template

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/certauth

https://github.com/openiddict/openiddict-samples

https://github.com/damienbod/AspNetCoreCertificates

Saturday, 02. November 2024

Jon Udell

How To Create Software Diagrams With ChatGPT and Claude

Earlier efforts to diagram software with LLM assistance weren’t fruitful, but this time around things went really well. I ended up with exactly what I needed to explain the architecture of a browser extension, and along the way I learned a lot about a couple of formats — Mermaid and Graphviz — as well as … Continue reading How To Create Software Diagrams With ChatGPT and Claude

Earlier efforts to diagram software with LLM assistance weren’t fruitful, but this time around things went really well. I ended up with exactly what I needed to explain the architecture of a browser extension, and along the way I learned a lot about a couple of formats — Mermaid and Graphviz — as well as their tool ecosystems.

How To Create Software Diagrams With ChatGPT and Claude

LLM series at The New Stack

Friday, 01. November 2024

Michael Ruminer

VSCode and Debugging Python in Virtual Environments

AI generated image of a beetle This post is really for me more than anyone else. I will be able to come back here and find it. If it helps you as well, then great. I have historically not been a Python programmer. Additionally, I have historically used Visual Studio versus VSCode. Lately, I have been doing Python in VSCode. I need to learn my way around. I recently found how to deb
AI generated image of a beetle

This post is really for me more than anyone else. I will be able to come back here and find it. If it helps you as well, then great.

I have historically not been a Python programmer. Additionally, I have historically used Visual Studio versus VSCode. Lately, I have been doing Python in VSCode. I need to learn my way around.

I recently found how to debug Python with breakpoints and watches in a virtual environment, or at least in the default “-m venv” virtual environment, much as I would in a different language in Visual Studio .

You can have the debug window create a launch.json in the .vscode folder of the root workspace directory or create it yourself from scratch. Here is one of my modified ones.

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: crewai series day_04",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}\\crewai_series"
},
"cwd": "${workspaceFolder}\\crewai_series\\day_04\\src"
},
{
"name": "Python: crewai series day_05",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {
"PYTHONPATH": "${workspaceFolder}\\crewai_series"
},
"cwd": "${workspaceFolder}\\crewai_series\\day_05\\src"
}
]
}

The real trick is to set that PYTHONPATH property to your folder with the virtual environment folder as a top-level subdirectory.

Bonus: you set different debug profiles like I did above and shift between them in the debug window. That is helpful when you have different virtual environments in the same workspace.

That’s it. That’s the post.

Wednesday, 30. October 2024

Mike Jones: self-issued

OpenID Presentations at October 2024 OpenID Workshop and IIW plus New Specifications

I gave the following presentation on work in the OpenID Connect working group at the Monday, October 28, 2024 OpenID Workshop at Microsoft: OpenID Connect Working Group Update (PowerPoint) (PDF) I also gave this invited “101” session presentation at the Internet Identity Workshop (IIW) on Tuesday, October 29, 2024: Introduction to OpenID Connect (PowerPoint) (PDF) […]

I gave the following presentation on work in the OpenID Connect working group at the Monday, October 28, 2024 OpenID Workshop at Microsoft:

OpenID Connect Working Group Update (PowerPoint) (PDF)

I also gave this invited “101” session presentation at the Internet Identity Workshop (IIW) on Tuesday, October 29, 2024:

Introduction to OpenID Connect (PowerPoint) (PDF)

There’s more happening in the OpenID Connect working group than at any other time since we started the OpenID Connect work. In fact, two new specifications were adopted today!

OpenID Federation Wallet Architectures 1.0 OpenID Connect Relying Party Metadata Choices 1.0

Thanks to all who helped us get there!

Tuesday, 29. October 2024

Just a Theory

PGConf & Extension Ecosystem Summit EU 2024

Notes and links from the Extension Ecosystem Summit EU 2024 and my first time at PGConf EU. Plus thoughts and photos from ancient sites and archeological museums I visited.

Last week I MCed the first Extension Ecosystem Summit EU and attended my first at PGConf EU in Athens, Greece. Despite my former career as an archaeologist — with a focus on Mediterranean cultures, no less! — this was my first visit to Greece. My favorite moment was the evening after the Summit, when I cut out of a networking shindig to walk to Pláka and then circumnavigate the Acropolis. I mean just look at this place!

The Acropolis of Athens on the evening of October 22, 2024. © 2024 David E. Wheeler

Highlight of the trip for sure. But the Summit and conference were terrific, as well.

Extension Ecosystem Summit

Floor Drees kindly organized The Extension Ecosystem Summit EU, the follow-up to the PGConf.dev original. While the Vancouver Summit focused on developers, we tailored this iteration to users. I started the gathering with a condensed version of my POSETTE talk, “State of the Postgres Extension Ecosystem”, but updated with a Trunk OCI Distribution demo. Links:

PDF PDF with Notes Keynote

We then moved into a lightning round of 10 minute introductions to a variety of extensions:

Jimmy Angelakos showed off pg_statviz, a “minimalist extension and utility pair for time series analysis and visualization of PostgreSQL internal statistics”. Adam Hendel gave a brief history of pgmq, is a “lightweight message queue like AWS SQS and RSMQ, but on Postgres.” Gülçin Yıldırım Jelínek introduced pgzx, “a library for developing PostgreSQL extensions written in Zig.” James Sewell talked about pgvectorscale and pgai for managing machine training workloads on Postgres. Alastair Turner described pg_tde, an extension that provides transparent data encryption for Postgres.

Quite the whirlwind! There followed open discussion, in which each maintainer went to a corner to talk to attendees about contributing to their extensions. Details to come in a more thorough writeup on the Tembo blog, but I personally enjoyed some fascinating discussions about extension distribution challenges.

PGConf.eu

Following the Summit, I attended several thought-provoking and provocative presentations at PGConf.eu, which took place at the same hotel, conveniently enough.

Floor Drees speaking at PGConf.eu 2024. © 2024 David E. Wheeler

In the conference keynote, Stacey Haysler explained the The PostgreSQL License Fee. I’m pleased to say that my employer “pays” license fee! Andres Freund (yes, that one) summarized NUMA vs PostgreSQL, covering some of the issues and opportunities for optimization of PostgreSQL on servers using the NUMA multi-processor memory architecture. Heikki Linnakangas offered an overview of The Wire Protocol, that bit of PostgreSQL technology that lets clients talk to PostgreSQL. Ophir Lojkine and Thomas Guillemard showed how a pretty sweet framework, SQLPage, lets archaeologists like Thomas write complete web applications in pure SQL, enabling rapid data entry while in the field. Tomas Vondra’s Performance Archaeology dug into the history of PostgreSQL improvements, mapping their compounding returns over time. Floor Drees (photo above) talked about Supporting extensions, but really now, making a strong case for the need to organize infrastructure to support the broader extension ecosystem.

There were many more talks, but clearly I tend to be drawn to the most technical, core-oriented topics. And also archaeology.

Museums

Speaking of which, I made time to visit two museums while in Athens. First up was the National Archaeological Museum of Athens, where I was delighted to explore the biggest collection of Mycenaean artifacts I’ve ever seen, including massive collections from the excavations of Heinrich Schliemann. So much great Bronze Age stuff here. I mean, just look at this absolute unit:

From the museum description: “Fragment of a krater depicting a chariot with two occupants. A male figure holding a staff walks in front of the chariot. Much of the Mycenaean Pictorial Style pottery (14th-12th centuries BC) with representations of humans, chariots, horses and bulls on large kraters, was produced at Berbati in the Argolid and exported to Cyprus, where it was widely imitated. Birds, fish, wild goats or imaginary creatures (i.e. sphinxes) occur on other types of vessels, such as jugs and stirrup jars. Usually only fragments of these vases survive in mainland Greece from settlement contexts. In Cyprus, however, complete vases are preserved, placed as grave gifts in tombs.” © Photo 2024 David E. Wheeler

The animal decorations on Mycenaean and Akrotiri pottery is simply delightful. I also enjoyed the Hellenistic stuff, and seeing the famed Antikythera Mechanism filled my nerd heart with joy. A good 3 hours poking around; I’ll have to go back and spend a few days there sometime. Thanks to my pal Evan Stanton for gamely wandering around this fantastic museum with me.

Immediately after the PGConf.eu closing session, I dashed off to the Acropolis Museum, which stays open till 10 on Fridays. Built in 2009, this modern concrete-and-glass building exhibits several millennia of artifacts and sculpture exclusively excavated from the Acropolis or preserved from its building façades. No photography allowed, alas, but I snapped this photo looking out on the Acropolis from the top floor.

The Acropolis as viewed from inside the Acropolis Museum. Friezes preserved from the Parthenon inside the museum reflect in the glass, as does, yes, your humble photographer. © 2024 David E. Wheeler

I was struck by the beauty and effectiveness of the displays. It easily puts the lie to the assertion that the Elgin Marbles must remain in the British Museum to protect them. I saw quite a few references to the stolen sculptures, particularly empty spots and artfully sloppy casts from the originals, but the building itself makes the strongest case that the marbles should be returned.

But even without them there remains a ton of beautiful sculpture to see. Highly recommended!

Back to Work

Now that my sojourn in Athens has ended, I’m afraid I must return to work. I mean, the event was work, too; I talked to a slew of people about a number of projects in flight. More on those soon.

More about… Postgres Extensions PGConf Summit Archaeology Athens Greece Acropolis Mycenae Elgin Marbles

Monday, 28. October 2024

Phil Windleys Technometria

Is Voting Secure?

I'm fairly certain that what I write here won't change the minds that need changing. But I feel like I need to make a statement anyway: your vote is secure.

There's a lot of fear mongering about the security of elections. I've wanted to discuss this for a while. I have several things in my background that have given me insight into how elections work. I was the CIO for the State of Utah. I was a member of the Lt Governor of Utah's voting equipment selection committee. And I've been involved in identity and security for several decades.

Let me give you the headline up front: committing election fraud in a way that changes the result is difficult, nearly impossible. Let's examine how elections are run and how fraud could happen to see why.

First a caveat: there is no single way that US elections are run. Elections in the US are quite decentralized. Each state has different election laws and in most cases the mechanics of running an election are given over to county clerks who must follow state law, but also have freedom to create their own workflows and processes within that law. The analysis that follows is generalized and likely more true of Utah, which I'm very familiar with, than other places. Still, I think the big ideas are largely the same everywhere.

The process of voting is divided into two parts: (1) voter registration and (2) voting. This is important because most people who make up scenarios to convince you that voting is insecure usually ignore voter registration. Registration requires that you provide an address. This is an important piece of information because if you're voting by mail, it's where the ballot will be mailed. If you're voting in person, you need to vote at a specific polling place depending on your address.

When you vote, you either mail back the ballot that was mailed to you at the address you provided or you go to your polling place and fill out a ballot (usually via a voting machine). In either case, the ballot presented to you depends on your address since the candidates listed on your ballot depend on your voting precinct. Also, as of 2024, 35 states require voters to present identification at the polling place in order to vote. Of those that don't, many require it for voters who are voting for the first time after their registration.

Now, let's examine voting fraud and how it might work. One important factor is scale. You need to commit fraud at a scale necessary to impact the outcome. For small elections (say a single state legislative race or a small school board election) you don't need to change a lot of votes to change the outcome in a tight race—hundreds of votes might do it. For larger elections, like the presidential election, scale is a significant issue. I'm going to focus on presidential elections since they are the most consequential. Less consequential elections are not likely to attract the kind of money and talent necessary to commit election fraud.

A second factor is stealth. You have to keep the fraud from being discovered so that it's not reversed. Proving consequential fraud would likely result in the election being challenged and rerun. You don't have to identify who did it, just prove that it was done. So election fraud is much more dependent on not being discovered than commercial transaction fraud where the loss is likely to only be recovered if the identity of the perpetrator is known.

The nature of presidential elections is greatly influenced by the electoral college system. You need to influence the votes in enough states to swing that state's electoral votes to the candidate you favor. You don't want to commit fraud where it's not needed because you'll waste money while increasing your chances of discovery. So, selecting the states where you want to commit fraud is critical. Each of those states will have different requirements, so you'll have to tailor your attack to each of them. Furthermore, you'll have to tailor your attack to each legislative precinct within the counties you determine are the most likely to impact the election.

There are a few ways to attack an election:

Sending your people to vote—for this to work, your fake voters have to have been registered and, in most cases, provide some form of ID. To register, they need a plausible address. The election office might not notice if one or two extra people with different last names are registered at a specific address, but they might if this is systematic or if an unreasonable number of people register at the same address. Remember that elections are run at the county level, so you have to assume that the election workers have a good understanding of the local environment. These fake voters now have to go to many different polling locations and cast a vote. They can't easily cast multiple ballots at the same polling location since the poll workers might remember them. So, you need lots of people going to lots of different polling locations.

Intercepting mail-in ballots—for this to work, you have to register at someone else's home address and then get to the mail before they do or steal their ballots after they've filled them in and change the vote. This requires lots of people. You can't do this remotely. It requires "boots on the ground" as the saying goes. Furthermore, those people are exposed since they're looking in mailboxes in neighborhoods where they don't live. Doable, but not very stealthy.

Paying people to vote—for this to work, you have to contact a lot of people, convince them to commit fraud, and then be satisfied with the fact that you'll never know if they voted for your candidate or not because ballots are secret. They could take your money and vote for whoever they want. Or just not vote at all unless you're supervising them, an activity that will call attention to you and your agents.

Replacing real ballots with fake ones—for this to work, you have to get your hands on real ballots for many different polling places (remember they're different because of overlapping jurisdictions), intercept the ballots somewhere in transit or on delivery, and replace the real ballots with ones that you've filled out for your candidate. This likely involves subverting county election workers. Not just one, but many. Again, the risk of discovery goes up with each contact.

Destroying ballots—for this to work, you need to destroy ballots that are for the candidate you don't want to win. You could simple destroy ballots without regard to how they're filled, but this won't assure you'll meet your goal. To be effective, you have to just destroy the ones for the other candidate and leave the ones for your candidate. Again, you will have to subvert election workers to get your hands on the ballots and determine who the ballot is for.

Changing the results after the ballots are counted—for this to work, you have to either hack the machines that record the vote or hack the machines that are tabulating the vote. Hacking the machines won't work if the machines keep a paper audit trail and it's used to audit results. Hacking the tabulators means getting access to those machines. Recall those are kept at the county level, so you have to hack many in different locations unless a single county can swing the election your way.

I hope all of this has at least given you a feel for the scale and scope of the problem. Pulling it off successfully without anyone knowing it happened is a difficult problem. Each method involves many people being let in on the secret—in some cases a lot of people. This isn't an operation that a small group of hackers can reliably pull off. Having lots of people involved increases the chances that you'll be discovered. The decentralized and distributed nature of how elections are run is a feature, and makes elections more secure and trustworthy.

On top of all this, election officials aren't stupid, lazy, or inept. Sure, you're going to find a few who are. But as a rule the elections officials I've interacted with at the state and county level are professionals who are attuned to these dangers and take active steps to protect against them. They are, as a rule, happy to talk about how they operate and will respond to polite requests for information about how they audit systems and the processes they have in place to protect the vote.

As an aside, do you know what's easier than committing election fraud? Using social media to convince people that election fraud is happening to reduce confidence in the election and sow discontent. Then you can use that discontent to challenge a legitimate election and maybe change the outcome if you don't like it. Ask yourself which is more likely.

Successfully changing the results of a presidential election isn't impossible. But the odds of doing so and not leaving any evidence—the perfect crime—are vanishingly small. I have confidence in the security of the US election system.

Photo Credit: Voting from DALL-E (public domain) Prompt: Draw a horizontal picture of a woman casting a ballot with a ballot box

Share

Subscribe now


Michael Ruminer

CrewAI, Simple Enough but It Once Made 100 API Calls Instead of 1

AI generated crew image. Note that some folks are backwards. :-) I continued my experimentation with CrewAI this weekend. To see the code, take a look at the following repo and path: Starter CrewAI Series and the day_04 folder specifically. In the day_04 package, I created a simple custom tool, one that uses Tavily. The two agent, two task package queries for news information on CrewAI and the
AI generated crew image. Note that some folks are backwards. :-)

I continued my experimentation with CrewAI this weekend. To see the code, take a look at the following repo and path: Starter CrewAI Series and the day_04 folder specifically. In the day_04 package, I created a simple custom tool, one that uses Tavily. The two agent, two task package queries for news information on CrewAI and then processes that info to create a report (markdown) on the latest news about CrewAI. I learned a few things outside that CrewAI just raised $18 million (US).

How it Works

It uses decorators on the classes and functions. I love decorators. I always have. I filed a patent once that used decorators in C# as a part of a solution for business rule traceability. But back to CrewAI. You’ll see code snippets like:

@CrewBase
class Day04Crew():

@agent
def researcher(self) -> Agent:

@task
def research_task(self) -> Task:

While to define the agent behavior, you use some YAML like the below:

researcher:
role: >
Senior Data Researcher on {topic}
goal: >
Find recent most relevant news on {topic} and limit your response to {limit} results
backstory: >
You're a seasoned researcher with a knack for uncovering the latest
developments on {topic}. Known for your ability to find the most relevant
information and present it in a clear and concise manner.

To define the task you use YAML like the below:

research_task:
description: >
Search news about {topic}
expected_output: >
A list of news articles about {topic} with the title, url, and content
agent: researcher

If I were to experiment deeper I’d try the research task description to be a more sophisticated prompt but this one returned decent results.

And that is largely it for a simple enough example. I was off to the races with the exception of some calls to actually run the agents.

What I Found

First off. I found that I need to do some discovery of the CrewAI capabilities for some increased logging or traceability. Even with agent verbosity turned on, it was too much of a black box for me. Maybe I didn’t look closely enough at the verbose output but it seemed a bit too superficial. I want to know what exactly was passed to the LLM, a timestamp, its response and that timestamp, which endpoints on the LLM, etc. I think some of that can be found using LangTrace or CrewAI AgentOps. I’ll almost certainly try that soon.

I also found that one time it got stuck in what I assume was some sort of loop. I can’t be certain exactly where, as I didn’t have any real logging or traceability (black box). But it was running far too long on just the first agent and task. I had to cancel out and when I did and looked at my usage of Tavily it had bumped up 100 API calls for that run versus the expected of only 1. That was very disconcerting. All other runs with the unmodified code performed only the expected 1 API call to Tavily.

The report output was what I was hoping for, but that has more to do with the LLM and Tavily results than with CrewAI.

I did notice that each task can have only one agent. That makes sense, I think. I would like to try where an agent has multiple tasks and has to choose the appropriate task for its job and also a scenario where an agent might call a task multiple times with slightly different input to get a more nuanced or expanded context for its actions. I don’t currently have an example use case for the latter. Give me some time or recommend one below. In these scenarios, traceability becomes even more important, and limits on task calling or tool usage are probably needed.

Final Thoughts

CrewAI covered the simple use case I wanted to try though it left me desiring more visibility into what it was doing. The implementation in my limited use case was easy. It was slow, but I don’t know where it was slow, because I didn’t have any instrumentation to see where it was spending its time. It might have been in the LLM and/or Tavily. All in all, I plan to experiment more with a hierarchical structure and with some attempts into observability and traceability. I wish I could say more and provide greater depth than what you can probably easily and quickly discern from the documentation but for now this is what I have. The next question is will I try the same in LangChain to compare or will I dig deeper into CrewAI first.

Saturday, 26. October 2024

Virtual Democracy

Earth Data Rescue 2025

2016 was a different election: 2024 is so much more important The election of a climate-change denying US president in 2016 gave rise to the potential for administrative policies that would obstruct the public’s use of government-held Earth data. Very soon after taking office, the Trump administration instructed that government websites be scrubbed of climate … Continue reading Earth Data Rescue&nb
2016 was a different election: 2024 is so much more important The election of a climate-change denying US president in 2016 gave rise to the potential for administrative policies that would obstruct the public’s use of government-held Earth data. Very soon after taking office, the Trump administration instructed that government websites be scrubbed of climate … Continue reading Earth Data Rescue 2025

Friday, 25. October 2024

Jon Udell

What Claude and ChatGPT can see on your screen

“If you work with these cloud platforms every day, you have doubtless forgotten that you ever had questions like these. But every newcomer does. And on a continuing basis, we are all newcomers to various aspects of applications and services. In so many ways, the experience boils down to: I am here, what do I … Continue reading What Claude and ChatGPT can see on your screen

“If you work with these cloud platforms every day, you have doubtless forgotten that you ever had questions like these. But every newcomer does. And on a continuing basis, we are all newcomers to various aspects of applications and services. In so many ways, the experience boils down to: I am here, what do I do now?

It’s nice if you can share your screen with someone who has walked that path before you, but that’s often impossible or infeasible. LLMs synthesize what others have learned walking the path. We typically use words to search that body of hard-won knowledge. Searching with images can be a powerful complementary mode.”

What ChatGPT and Claude can see on your screen

Part of the LLM series at The New Stack.

Thursday, 24. October 2024

Heres Tom with the Weather

CPJ Head Condemns Israel's Deadly War on Journalists

Jodie Ginsberg, CPJ’s chief executive officer: No journalist from outside Gaza has been allowed in since the start of that war, and that’s highly unusual. I speak to lots of war correspondents who’s covered many, many wars over decades, and all of them talk about how unprecedented this is to not have any access whatsoever. And that, of course, puts additional pressure on these journalists

Jodie Ginsberg, CPJ’s chief executive officer:

No journalist from outside Gaza has been allowed in since the start of that war, and that’s highly unusual. I speak to lots of war correspondents who’s covered many, many wars over decades, and all of them talk about how unprecedented this is to not have any access whatsoever. And that, of course, puts additional pressure on these journalists.

CPJ Head Condemns Israel’s Deadly War on Journalists in Gaza as IDF Threatens Al Jazeera Reporters

In the interview, Amy Goodman also mentions “James McGovern leading 64 other congressmembers in a letter to Biden and Blinken, urging them to push for Israel to allow in international journalists”

Monday, 21. October 2024

Michael Ruminer

Using LM Studio and CrewAI with Llama

I was recently experimenting with CrewAI, but in one experiment I wanted to use a local LLM hosted by LM Studio. Why LMStudio? Well… because that was the experiment. I wanted to see how I’d use LMStudio to host my model versus Ollama and then use it from CrewAI. Below is a very simple setup for doing this. It’s good to point out that CrewAI uses LiteLLM under the hood as a sort of proxy. Thi

I was recently experimenting with CrewAI, but in one experiment I wanted to use a local LLM hosted by LM Studio. Why LMStudio? Well… because that was the experiment. I wanted to see how I’d use LMStudio to host my model versus Ollama and then use it from CrewAI. Below is a very simple setup for doing this.

It’s good to point out that CrewAI uses LiteLLM under the hood as a sort of proxy. This provides CrewAI with the ability to talk to a range of LLMs without needing to really do much in terms of handling it.

What Doesn’t Work and Why

The first thing I found is what doesn’t work. The LLM class in CrewAI allows for the instantiation of an LLM that can then be used by agents. Spinning up an LLM instance on a local Ollama hosted model can look like below.

ollama_31_8b = LLM(
model="ollama/llama3.1",
base_url="http://localhost:11434"
)

This works just fine if hosting the LLM inside Ollama, but you get response exceptions if, instead, you try to host inside LMStudio at the same server port.

ERROR: LiteLLM call failed: litellm.APIConnectionError: 'response'

First, you notice that the base_url doesn’t have a “/v1” at the end which LMStudio uses in their server setup. If you fix that, thinking it might work, you’ll find that you likely get the same error.

Secondly, you may realize that the model property in your LLM instantiation uses a [PROVIDER]/[MODEL] format. I tried removing the provider portion to see what would happen. The results were:

llm.py-llm:161 - ERROR: LiteLLM call failed: litellm.BadRequestError: LLM Provider NOT provided.

That’s a reasonable outcome.

What Does Work

Lastly, I remembered that LM Studio is using OpenAI endpoints.

A quick look at the LiteLLM docs provided the answer I needed; set the provider as “openai”. This results in a final outcome of:

ollama_31_8b = LLM(model="openai/llama3.1", base_url="http://localhost:11434/v1")

Now, if you try running it with the agent using the LLM instantiated it will work. Below is example code of the LLM and agent creation where I had Llama 3.1:8b model hosted in LM Studio on port 11434.

@CrewBase
class MyCrew():

llama_31_8b = LLM(
model="openai/llama3.1",
base_url="http://localhost:11434/v1"
)

@agent
def joke_generator(self) -> Agent:
return Agent(
config=self.agents_config['joke_generator'],
verbose=True,
llm=self.llama_31_8b
) Note

Note that on LMStudio I had my server port set to 11434 versus the default of 1234. It made it easier as I switched back and forth between Ollama and LM Studio; I didn’t need to modify the port. 11434 is the default Ollama port.

When Might I Use This

When might I use this? If I am programming, probably rarely. I could instead host the model in Ollama. I’d use LM Studio if I want to host a model and chat with it. In that scenario, I’d probably be more likely to use Ollama with AnythingLLM which would also provide me with some Retrieval-Augmented Generation (RAG) capabilities. Nonetheless, it was an experiment and I proved, for myself, it could easily be done.


Damien Bod

Implement security headers for an ASP.NET Core API supporting OpenAPI Swagger UI

This article shows how to implement security headers for an application supporting an API and a swagger UI created from a open API in .NET 9. The security headers are implemented using the NetEscapades.AspNetCore.SecurityHeaders Nuget packages from Andrew Lock. Code: https://github.com/damienbod/WebApiOpenApi Deploying a web application which supports both an API and a UI have different […]

This article shows how to implement security headers for an application supporting an API and a swagger UI created from a open API in .NET 9. The security headers are implemented using the NetEscapades.AspNetCore.SecurityHeaders Nuget packages from Andrew Lock.

Code: https://github.com/damienbod/WebApiOpenApi

Deploying a web application which supports both an API and a UI have different levels of security requirements. The Swagger UI is created from an Open API specification and uses inline Javascript with no hashes or nonces which requires weak security definitions. The API has no UI and can use the maximum security header definitions. It can be locked down as much as possible against the typical web UI attacks.

The API endpoints can be secured using a definition with strict security headers and a lot of browser features locked down.

public static class SecurityHeadersDefinitionsAPI { private static HeaderPolicyCollection? policy; public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev) { // Avoid building a new HeaderPolicyCollection on every request for performance reasons. // Where possible, cache and reuse HeaderPolicyCollection instances. if (policy != null) return policy; policy = new HeaderPolicyCollection() .AddFrameOptionsDeny() .AddContentTypeOptionsNoSniff() .AddReferrerPolicyStrictOriginWhenCrossOrigin() .AddCrossOriginOpenerPolicy(builder => builder.SameOrigin()) .AddCrossOriginEmbedderPolicy(builder => builder.RequireCorp()) .AddCrossOriginResourcePolicy(builder => builder.SameOrigin()) .RemoveServerHeader() .AddPermissionsPolicyWithDefaultSecureDirectives(); policy.AddContentSecurityPolicy(builder => { builder.AddObjectSrc().None(); builder.AddBlockAllMixedContent(); builder.AddImgSrc().None(); builder.AddFormAction().None(); builder.AddFontSrc().None(); builder.AddStyleSrc().None(); builder.AddScriptSrc().None(); builder.AddBaseUri().Self(); builder.AddFrameAncestors().None(); builder.AddCustomDirective("require-trusted-types-for", "'script'"); }); if (!isDev) { // maxage = one year in seconds policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365); } return policy; } }

The API calls would return the following headers in the HTTP response. The CSP blocks Javascript.

The Swagger definition allows unsafe Javascript. This allows for XSS attacks and is a weak level of security. This is required due to the way the Swagger UI is created.

public static class SecurityHeadersDefinitionsSwagger { private static HeaderPolicyCollection? policy; public static HeaderPolicyCollection GetHeaderPolicyCollection(bool isDev) { // Avoid building a new HeaderPolicyCollection on every request for performance reasons. // Where possible, cache and reuse HeaderPolicyCollection instances. if (policy != null) return policy; policy = new HeaderPolicyCollection() .AddFrameOptionsDeny() .AddContentTypeOptionsNoSniff() .AddReferrerPolicyStrictOriginWhenCrossOrigin() .AddCrossOriginOpenerPolicy(builder => builder.SameOrigin()) .AddCrossOriginEmbedderPolicy(builder => builder.RequireCorp()) .AddCrossOriginResourcePolicy(builder => builder.SameOrigin()) .RemoveServerHeader() .AddPermissionsPolicyWithDefaultSecureDirectives(); policy.AddContentSecurityPolicy(builder => { builder.AddObjectSrc().None(); builder.AddBlockAllMixedContent(); builder.AddImgSrc().Self().From("data:"); builder.AddFormAction().Self(); builder.AddFontSrc().Self(); builder.AddStyleSrc().Self().UnsafeInline(); builder.AddScriptSrc().Self().UnsafeInline(); //.WithNonce(); builder.AddBaseUri().Self(); builder.AddFrameAncestors().None(); }); if (!isDev) { // maxage = one year in seconds policy.AddStrictTransportSecurityMaxAgeIncludeSubDomains(maxAgeInSeconds: 60 * 60 * 24 * 365); } return policy; } }

The HTTP response would look something like this:

The security headers are setup to always use the API swagger definitions except for the swagger routes. This is used in development. I still don’t deploy this to production, unless the Swagger UI is absolutely required. In production, all responses use the stricter security header definitions.

// Open up security restrictions to allow this to work // Not recommended in production var deploySwaggerUI = builder.Configuration.GetValue<bool>("DeploySwaggerUI"); var isDev = builder.Environment.IsDevelopment(); builder.Services.AddSecurityHeaderPolicies() .SetPolicySelector((PolicySelectorContext ctx) => { // sum is weak security headers due to Swagger UI deployment // should only use in development if (deploySwaggerUI) { // Weakened security headers for Swagger UI if (ctx.HttpContext.Request.Path.StartsWithSegments("/swagger")) { return SecurityHeadersDefinitionsSwagger.GetHeaderPolicyCollection(isDev); } // Strict security headers return SecurityHeadersDefinitionsAPI.GetHeaderPolicyCollection(isDev); } // Strict security headers for production else { return SecurityHeadersDefinitionsAPI.GetHeaderPolicyCollection(isDev); } });

The security headers are added as middleware using the UseSecurityHeaders methods.

app.UseSecurityHeaders();

Notes

This setup works good and the correct headers for the API are used in both development with the Swagger UI or without the Swagger UI. No weaken headers are deployed to production.

Links
Improving application security in an ASP.NET Core API using HTTP headers – Part 3

https://securityheaders.com/

https://csp-evaluator.withgoogle.com/

Security by Default Chrome developers

A Simple Guide to COOP, COEP, CORP, and CORS

https://github.com/andrewlock/NetEscapades.AspNetCore.SecurityHeaders

https://scotthelme.co.uk/coop-and-coep/

https://github.com/OWASP/ASVS

Thursday, 17. October 2024

Mike Jones: self-issued

OAuth 2.0 Protected Resource Metadata Specification in RFC Editor Queue

I’m pleased to report that the “OAuth 2.0 Protected Resource Metadata” specification has been approved by the IESG and is now in the RFC Editor queue. The version approved by the IESG and sent to the RFC Editor is: https://www.ietf.org/archive/id/draft-ietf-oauth-resource-metadata-13.html It joins OAuth 2.0 Security Best Current Practice and JWT Response for OAuth Token Introspection, […]

I’m pleased to report that the “OAuth 2.0 Protected Resource Metadata” specification has been approved by the IESG and is now in the RFC Editor queue.

The version approved by the IESG and sent to the RFC Editor is:

https://www.ietf.org/archive/id/draft-ietf-oauth-resource-metadata-13.html

It joins OAuth 2.0 Security Best Current Practice and JWT Response for OAuth Token Introspection, which are also both currently there.

Thanks to the IETF directorate reviewers and IESG members for their feedback that resulted in improvements to the specification!

Wednesday, 16. October 2024

Decentral Gabe

The Greatly Exaggerated Demise of SSI: A Rebuttal to Premature Eulogies

💡 This is written in response to a post titled "Why Verifiable Credentials Aren't Widely Adopted & Why Trinsic Pivoted" A forewarning—there will be no tears here and, please, no hugging. credit, XKCD https://xkcd.com/386/ The post I'm responding to

💡 This is written in response to a post titled "Why Verifiable Credentials Aren't Widely Adopted & Why Trinsic Pivoted"

A forewarning—there will be no tears here and, please, no hugging.

credit, XKCD https://xkcd.com/386/

The post I'm responding to makes a point about people resisting its conclusions because their livelihoods depend on it. But let’s be real—Trinsic depends on this too, just as much as mine does. We’re both here, with skin in the game, and that's a good thing. I continue to work on figuring out how to make self-sovereign identity work at scale because I believe it's worth it. If I was not convinced of its value, I wouldn't be here debating it; I'd have moved on to easier, more profitable paths. That’s the commitment this industry requires—guts, patience, and a long-term perspective.

So let's set the stage clearly. This isn't just about egos or jobs; it's about a vision for the future of digital identity. And while you’ve pivoted, it's worth looking at the broader picture and challenging the notion that SSI is somehow "dead" just because it's hard. We’re not the first to face a daunting path—nor will we be the last.

The Market Isn't the Oracle You Think It Is

Your unwavering faith in the market's infallibility is touching. You proclaim, "The market is the objective reality," as if channeling the spirit of a laissez-faire economist at a startup retreat. But let's examine recent history.

Betamax was superior to VHS, but marketing muscle won the day. The QWERTY keyboard isn't ergonomic, yet it's entrenched due to historical happenstance. The invisible hand often leads us down paths of inefficiency and fragmentation, leaving a trail of superior but abandoned technologies in its wake.

Fragmentation and incompatible standards aren't signs of the market "choosing" the best option; they're about who can shout "MINE!" the loudest while elbowing competitors off the playground. Sometimes, it takes a guiding hand—a nudge from governments or standard bodies—to steer the market toward what's efficient and beneficial for all.

Pivoting Isn't Prophecy you can do better, hon

The leap from "We couldn't make it work" to "It can't work" is a logical chasm too wide to cross. Your pivot from SSI evangelist to skeptic, while understandable, isn't a revelation of universal truth.

This is akin to Friendster declaring social media a dead end, or Blockbuster declaring video streaming a passing fad. The inability to monetize a nascent technology doesn't negate its potential; it merely highlights the gap between visionary ideals and the brutal realities of running a startup. For example, certain decentralized identity projects have successfully implemented verifiable credentials in applications like educational certificates, employment verification, and gaining access to the financial system, demonstrating real-world utility and growing momentum. These efforts show that verifiable credentials are gaining traction in specific, focused use cases.

Let me be unequivocal: I commend you for having the guts to start a company, work hard for years, and continue to try to make it viable. That is nothing short of admirable. Your pivot might make sense for Trinsic, but it's hardly the canary in the coal mine for SSI.

SSI, like many transformative technologies before it, may simply be awaiting its "streaming moment" — that convergence of technological readiness, market understanding, and user demand that catapults it from interesting concept to indispensable tool.

The Power of Collective Standards

Dismissing government involvement as a mere "silver lining" is like calling the sun a "helpful light bulb." Let's not overlook crucial historical precedents.

The internet (ARPANET), GPS, and even time zone standardization were government initiatives. The metric system, USB, and Wi-Fi all benefited from coordinated efforts beyond market forces. These standards didn't become universal because the market willed them so, but because of coordination to prevent fragmentation.

It is important not to ignore this. Preventing the chaos of incompatible systems often requires patience and collaboration—yes, even more patience than the industry has shown to this point.

Scattered Seeds Grow Diverse Forests

Your lament that SSI's "heat map is too scattered" misses the point. This diversity isn't a bug—it's a feature. The applications sprouting in education, finance, healthcare, and agriculture worldwide are the seeds of a diverse forest, not a failed monoculture.

Yes, SSI's initial user experience may be challenging, but that's par for the course with transformative technologies. Remember when 2G networks made downloading a single image feel interminable? Or when dial-up internet's screeching was our daily soundtrack?

Every groundbreaking technology endures growing pains. Users adapt, technologists adapt, and the market adapts with them—especially when the endgame offers control, privacy, and empowerment.

Business Goals Aren't Universal Truths

There's a profound difference between "We couldn't make it work for our business" and "The technology is inherently flawed."

Your focus on immediate market adoption overlooks the long-term value of doing the right thing—the hard thing—the thing that maybe, honestly, is not suited for startups that need to show growth and profit now. Perhaps a successful SSI startup is better suited as a B-Corp.

While market challenges are real, the problems that led us to SSI have only grown more severe. Data breaches are no longer news; they're an expectation. Surveillance Capitalism has entrenched itself deeper into the fabric of our digital lives, commodifying our every interaction. Government-issued digital identities, on the hardware of monopolistic tech giants, laced with privacy-eroding mandates, threatening to erode what little privacy we have left.

SSI isn't just a novel technology; it is our defense against these escalating digital threats.

Focused Implementation

While the post laments the scattered nature of SSI adoption, I see this differently. There is a clear answer to the diversity challenge: focus on specific, high-impact use cases. Our net is intentionally not cast wide.

We don't require credentials to be used across different domains from which they were issued. That's a potential bonus, not a requirement. It does not undermine the original goal of the technology; optionality is a strength. It leaves the door open for future cross-domain adoption without dependence on it for current success.

This focused strategy allows us to deliver value in targeted areas while building the infrastructure for broader adoption. It’s a pragmatic approach that addresses immediate needs while paving the way for SSI’s long-term vision. An iterative approach helps build confidence in the SSI ecosystem, one application at a time.

The success of SSI won't come from boiling the ocean. We’re laying the groundwork for future interoperability while delivering value today.

A Vision Beyond The Fiscal Calendar

While some may chase immediate market opportunities, many of us remain committed to SSI's promise. Transformational change isn't measured in fiscal quarters but in steady progress over years, many years. It demands fortitude, collaboration, and a willingness to look beyond short-term gains.

To the SSI community: Let this be our rallying cry. We're not just building a product; we're creating the foundation for human-centric digital identity. Let's continue to collaborate on improving user experience, pushing interoperability, and engaging governments and standards organizations. Every effort, no matter how small, contributes to a future where secure, privacy-respecting, self-sovereign digital identity is the norm.

The most compelling technological advances come from those who persevere when the path gets steep. The future of digital identity—one that isn't controlled solely by governments or tech monopolies—is counting on us.

credit: Dune

Should you find yourself at the next IIW, or the one after that, perhaps hosting a session titled "I Was Wrong About Being Wrong About SSI," feel free to invite us—we'll be there. We won't cry, clap, or hug you. We'll simply nod, in recognition that the most profound insights often come from pushing through challenges, not pivoting away from them.

Tuesday, 15. October 2024

Riley Hughes

Why Verifiable Credentials Aren’t Widely Adopted & Why Trinsic Pivoted

A presentation I gave at IIW38, in April 2024. At the Internet Identity Workshop 38, I announced my talk with a description something like this: Five years ago at this conference, Trinsic’s first product (our self-sovereign identity wallet app) was launched. Today, I’m hosting a session called “SSI didn’t work. Trinsic is pivoting.” I knew it was a provocative title — and I fully consid
A presentation I gave at IIW38, in April 2024.

At the Internet Identity Workshop 38, I announced my talk with a description something like this:

Five years ago at this conference, Trinsic’s first product (our self-sovereign identity wallet app) was launched. Today, I’m hosting a session called “SSI didn’t work. Trinsic is pivoting.”

I knew it was a provocative title — and I fully considered that apostatizing this publicly could result in a mob of opposition. But I was not prepared for what actually happened.

Right after my announcement (and brief, surprised gasp from the crowd of ~350 people) one IIW veteran popped off his chair and clapped his way across the room to embrace me. Right before my session, the CEOs of two separate identity companies asked to broadcast the talk online (one via livestream, another via live Tweet). Right after my session during the closing circle (where the original crowd of ~350 reconvened), the cofounder of the conference wept as she thanked me. Another longtime identity veteran stood immediately after and claimed it was the most important session held at the event in the last 5 years. The next morning, a startup CEO called for memorializing a “Riley Session” as a new staple of the conference twice each year. More than a dozen people asked me to reprise my session.

I say this all descriptively, not boastfully. Far from feeling proud, I actually felt humbled to have had the opportunity to contribute something evidently valuable to a community which has given me so much. (It was at an IIW in 2018 that I realized I wanted to build a career in this industry.) That is the context for this post — to share apparently-useful insights that hopefully will result in getting the world closer to using better digital ID technologies.

The spoiler for this article: I’m no longer betting on verifiable credentials taking off. I mean this literally — 99% of my net worth is Trinsic stock, so the strategy I bet my company on is an objective revelation of my strongest convictions. While once central to Trinsic’s existence, our latest pivot demonstrates that I believe interoperable digital credentials won’t succeed in market anytime soon.

Specifically, my prognostication is that digital identities will continue to be deployed and adopted, but that fragmentation, incompatibility, and bespoke implementations will continue to dominate the market.

Now, I’ve been working on this problem for 7 years. Explaining how I landed on this conclusion requires expounding on years of the business equivalent of trench warfare. This post is a deep dive, not a summary. If you want a summary, I suggest dropping this post into your LLM of choice (I won’t be offended). I’ll do my best to be concise, but I also intend on being thorough. The structure of this post is as follows:

Assumptions

Brief History

Impossible Problems

Bull Case

End

Assumptions

Assumption #0: I’ve drunk the Kool-aid

As you read this post, your walls might go up. Especially if your salary depends on me being wrong. Just be aware of your biases and know that I am still Kool-aid drunk on the philosophy of self-sovereign identity. I want that future as much as anybody. But in my sincere pursuit to discover reality, I’ve learned some things that I hope others can benefit from.

Assumption #1: Terminology

I will use “verifiable credential” or “VC” in this post quite a bit. I’ll also use “self-sovereign identity” or “SSI” or “IDtech”. “Decentralized identity” or “DI” could be subbed in too for all I care. Fundamentally, I’m trying to communicate: A standard way to exchange trustworthy data in a user-centric/user-controlled way. But I’m intentionally avoiding being too pedantic, so don’t get overly caught up in semantics.

Assumption #2: The world is huge

The world is inconceivably big.

Consulting in SSI is a good way to make a living. But hand-to-hand combat is insufficient to get VCs adopted. The only way to scale something on the magnitude needed for SSI to work is a product with product/market fit. That, or regulatory obligation.

Imagine if companies needed Accenture to adopt artificial intelligence. Now consider how that differs from a world where any developer can pick up an API key from OpenAI and implement GPT4 in an afternoon. LLMs have product/market fit, SSI does not.

Assumption #3: The market is reality

Here’s how I think about startups & new product development. The market is unknowable in its entirety. If it was known how to build a successful product (in our case, a widely-adopted SSI wallet or an adoptable VC format), it would have been done by now. To make progress at the cutting edge, you must do something desirable and different. Andy Radcliff calls this being “non-consensus and right”.

Chamath describes a startup as an exercise in mentally modeling the “market” and building a product to fit that model. If your product is rejected, your model of the world is wrong and you need to iterate its form. If your product is adopted, your model of the world is right.

All this is to say, the market is the objective reality. It decides winners and losers. As I’ve sought to get product/market fit in this space, I seek to discover reality as impartially as I can. When I see evidence of something working, I pay attention; when I see evidence that something isn’t working, I try to absorb those data points too.

Assumption #4: The best technology gets adopted

The worth of software is its impact on humans. The most elegant, idealistic, best software is therefore worthless unless it’s adopted. Actually, if it’s not adopted, it’s not elegant, idealistic, or best — no consolation prizes. The market is the judge and if your product isn’t making an impact on people’s lives, it’s no better than a refrigerator on the moon.

Adoption isn’t just the most important thing, it’s the only thing. Thus, this is actually a tautology: by definition, what gets adopted is best.

Assumption #5: Don’t waste your time

I’ve thought a lot about the optimal point between discouraging and cautioning. Yes, I’ve tried a lot of things but it’s important to state that markets change. Maybe something is different now than when I tried it. I surely can’t turn over every stone. Running new or differentiated experiments in this market is probably fruitful–I don’t want to discourage innovation. But I do want it to shine a light on the graveyard that exists in this space and hopefully prevent people from doing things that are doomed to fail.

Brief history

I started my journey in identity in 2017 when I interviewed for a job at Sovrin Foundation. I started Trinsic with two cofounders in 2019 because of the relatively low adoption of Sovrin’s network. I thought if we made the technology dramatically easier to use, more companies would adopt SSI.

Me plus Tomislav & Michael, my cofounders, launching our product at IIW in 2019.

We built something good. Hundreds of developers were signing up every month and issuing verifiable credentials. One of those developers was Wayne Chang who, before cofounding Spruce, gave me the feedback that Trinsic was the best execution of any SSI product in the market. He asked something like:

“With a product like this (where a developer can get value for free) you are probably either using this as lead gen for $250k consulting deals, or you’re just really betting on verifiable credentials blowing up.”

I told him we were betting on VCs blowing up.

Our aim was to build a product that would accelerate VC adoption. In our view, if a customer needed consulting to succeed, it was a signal the product wasn’t good enough. (We did consult customers on how to succeed — but we treated this time as product discovery time, and incorporated the results immediately into the product roadmap.)

What happened is we acquired dozens of paying customers, but not enough were successful enough. We had roughly 1 breakaway customer story per 500 companies that signed up. The rest were either startups that failed to get traction or large enterprise R&D departments that never went to production.

In the meantime, the market shaped out in an undeniable way. Dozens of companies obtained product/market fit in the reusable identity space, none of which use the VC standard. Either none of the successful companies chose to use VCs, or none of companies that chose VCs succeeded (two statements of identical outcome but different presumed causation).

A slide I made in 5 mins immediately before my IIW38 presentation to make this point!

In fact one such company, which raised over $75m from top-tier venture capitalists to fuel its meteoric growth, said to me (paraphrasing):

“The SSI people had a good idea. So we’re applying that idea to get customers while they’re wasting their time in working groups. You can think of us as proprietary SSI.”

It’s been a few years since I was told that. I recently checked back in on them. They’re used by tens of millions of users.

Another reusable ID company used by several million end-users, which has raised 10s of millions, told me (paraphrasing):

“We are building a monopoly. Our goal is to own the identity layer of the internet. It might not work, but if it does, we’re going to make a lot of money.”

Both companies were started after 2019 (the year the VC data model became a W3C recommendation) and chose not to use standards.

This dynamic vexed me for months. Why was the market rewarding companies with inferior identity solutions?

It took me too long to conclude that SSI is the inferior identity solution. The market determines winners and losers, better and worse — and there are important reasons the market is rejecting verifiable credentials in favor of proprietary solutions.

After 4+ years of hypothesizing, experimenting, evaluating, and iterating, I found what I consider to be intractable problems that block adoption of verifiable credentials. I do not know the answers to these problems. If you’re building in the IDtech space, you should take these problems seriously because, in my view, these are the billion-dollar questions you’ll need to crack to have any meaningful success.

Impossible problems

Impossible problem #1: Interoperability is the premise, but doesn’t exist

Standards exist to enable compatibility. If interoperability isn’t important, simple alternatives to verifiable credentials exist (such as signing — or not signing — JSON). The ability to share data with an arbitrary 3rd-party in a standardized way (without bespoke integration or direct connection to issuing source) is the core purpose of VCs. But that doesn’t actually exist right now.

In other words, the reason for the existence of VCs is not present.

This is because interoperability at the application level requires technical interoperability of keys/signatures, public key resolution, exchange protocols, request/response formats, data models, semantics, and a host of underlying elements. (Not to mention nontechnical interoperability elements, like business models and trust frameworks.) Because a myriad of VC variants, exchange protocols, signature suites, etc. have emerged over the years, which must all line up to effectively interoperate, the only practical way to achieve interoperability with others is to use the same software.

Theoretically, if everyone in the industry agreed upon a single standard to use, interoperability would be present, and there would begin to be value to adopting VCs today — but there’s a problem: which standard should be adopted? and what if it’s the wrong one?

Prematurely standardizing is a risky endeavor. But in order to find out what kind of digital credential will have real product/market fit — and thus be adopted — the world needs to experiment, iterate, innovate, over trade-offs to discover what the market will adopt.

Do you see the problem? VCs need innovation, iteration, and experimentation to succeed. But they also need standardization, agreement, buy-in, and stagnation to have value. These two forces are directly opposed. I wrote about this dynamic more in a post several years ago.

An image I made in 2022 for a post I wrote about the tension between interop & innovation.

Standardization is essential for adoption. But adoption is essential for knowing what to standardize (there’s nothing worse than standardizing the wrong thing)! Prematurely standardizing before adoption is a classic “cart before the horse” scenario.

To be clear, none of this means that there is no reason to adopt VCs now — it means every reason to adopt VCs today is in anticipation of future value. Because today, verifiable credentials offer zero marginal value relative to simpler alternatives. To rationally adopt VCs, one must make a bet on the future. Some bold companies will be willing to take that very costly journey (like we did), but most will not.

Impossible problem #2: Initial UX is worse than baseline

Verifiable credentials are always a better UX than existing identity solutions at scale, but always a worse experience initially.

I had a mask-laden conversation with the late Vittorio Bertocci at the Internet Identity Workshop in 2021 where I was working to convince him of the merits of VCs as he advocated for federated approaches.

His point: VCs aren’t necessary to share data outside its original domain. Take, for example, Airbnb wanting to verify a digital driver’s license. Instead of using a VC, DMVs could become an IdP, and Airbnb could add a “verify with X driver’s license button” into their app. The tech exists today.

My point: Yes, but nobody does that today because it doesn’t work in person, doesn’t work offline, doesn’t work when presenting multiple credentials, doesn’t work when privacy needs to be preserved, etc. But most importantly, in this example Airbnb would need to add a “verify with X” button for all 50 states, which is a very bad UX — VCs would enable one universal verification button!

I’ve thought a lot about this interaction. While I like to think I helped nudge Vittorio a bit on the value VCs could provide, you’ll notice my points are basically only relevant at scale.

For a concrete example, take AI agents who need identity wallet capabilities. We ran a whole campaign about this at Trinsic and spoke to dozens of AI agent developers (see this landing page, watch the demo video!). It’s obvious the problem exists in the long-term. As a user, it’s a pain to provision an agent access to all my accounts, info, etc. needed for it to accomplish real tasks for me. But in the near-term, 100% of the AI developers we talked to just chose to use OAuth to connect to sources where users’ data exists already (e.g. Google).

If a user already has a wallet with a bunch of useful credentials in it, obviously sharing those is a better UX than redoing the onboarding process that was required to obtain those credentials. But acquiring the wallet with credentials in the first place will always cause extra friction upfront, which businesses and users are very reluctant toward.

This problem is compounded because businesses don’t just adopt things that are a little bit better than alternatives. In order to switch behaviors or risk their careers on unproven technologies, new solutions need to be better enough to justify that extra investment. And unfortunately for VCs, for every initial use case I’m aware of, the experience is objectively worse.

I shared more insights from Vittorio here.

Impossible problem #3: Heat map is too scattered

When I was raising money for Trinsic as a general-purpose verifiable credential platform, investors would often ask what the most prominent use case for verifiable credentials was — and more specifically, what the most common use case for Trinsic’s customers was. My answer sucked:

Our customers are building use cases in education, employment, financial services, healthcare, insurance, industrials, government, and agriculture. And more!

Once, in pursuit of a better answer to this question, we plotted the industries, geographies, and use cases of 100+ paying customers. The scatter plot was all over the place. Nothing stuck out prominently. It didn’t make sense to double down on a specific industry or use case because none dominated our demand. We didn’t even have geographic consistency — adoption existed from Myanmar to Peru to USA to Romania.

My cofounder Michael continuously sounded the alarm in my ear: in order for VCs to take off, a network effect needs to take hold. No network effect will exist if all adoption is completely scattered.

This problem doesn’t just affect Trinsic, it affects the entire VC space. Until pockets of adoption breed more adoption in a virtuous cycle, the rate of adoption will be capped to a linear value — and adoption to 1+ billion people requires exponential rates.

To drive this point home, I’ll cite an example from a packed room at a previous Internet Identity Workshop, circa 2020. In a room full of decentralized ID vendors, I asked for a raise of hands: “Who has ever heard of a verifiable credential being used for a purpose other than that for which it was issued?” (In other words, who has ever heard of a verifiable credential being used for the reason the VC standard was created.)

No hand went up.

I asked again in 2024. Still crickets.

Verifiable credentials won’t take off until this sort of thing is commonplace. This cross-context data sharing simply won’t happen until both sides of the exchange are interested in similar credentials, or are from a similar industry or geography. In other words, this won’t happen until the heat map of potential use cases lights up in a particular spot. But the current nature of the market is very scattered.

Bull case

This post outlines why I’m not betting on verifiable credentials taking off anytime soon. But if I had to articulate the bull case, there are two arguments here: government mandates and timing/direction of causality.

Governments

Governments represent the silver lining for verifiable credentials. While, in my view, the private sector lacks a viable adoption path for the reasons outlined above, governments have different incentives. Governments build utilities, and there is a good argument that interoperable digital ID is a government utility. Many governments in the West are investing in VCs, most notably eIDAS 2.0. Although even that is far from settled.

Government involvement is not limited to government-issued credentials. Virtually every private sector company in the verifiable credential world (except Trinsic, for what it’s worth) has been subsidized by governments funding their preferred VC standards (DHS funding different standards than the EU, for example). Various technologies through the years have succeeded due to government mandates or subsidies–nothing wrong with it inherently–but it is a telling aspect.

Governments compelling use of interoperable digital credentials represents the most likely success case for VCs I can think of. But that scenario exists in the medium-term, not the short-term.

Timing

The other argument says that verifiable credentials are simply too early. Many of the leading reusable ID ecosystems like IDme, Yoti, CLEAR, etc. were started and initially grew before the VC standard was finalized/stabilized. So one could argue these companies, if started today, could have had the same or greater success using verifiable credentials rather than a proprietary solution.

Unfortunately, recently companies like Incode, Footprint, Plaid, and many others launched “reusable ID” products and chose not to use VCs after extensive research. And have succeeded far beyond most SSI products. Which presents a difficult rebuttal to this argument.

One cannot rule out the possibility that companies can succeed betting on the VC standard. But it’s difficult to point to examples of VCs helping a business solve problems for customers (and thus make money) — and it’s trivial to point to dozens of examples of companies sinking millions of dollars into verifiable credential infrastructure (money which could have been spent acquiring customers). One hypothesis is that tinkerers are attracted to VCs while aggressive operators are less likely to experiment on new technologies or make speculative bets on the future.

End

I referenced Vittorio earlier, and I’ll cite him one last time here. In a blog post about his involvement in the CardSpace project at Microsoft, which is a spiritual ancestor of modern SSI, he said:

“When the user centric identity effort substantially failed to gain traction in actual products, with the identity industry incorporating some important innovations (hello, claims) but generally rejecting many of the key tenets I held so dear, something broke inside me. I became disillusioned with pure principled views, and moved toward a stricter Job to be done, user cases driven stance.”

I’ve not changed my convictions on the future I want to live in. Nor has my resolve wavered in my desire to build that future. But the market has spoken. Prematurely standardizing a pre-product/market fit technology won’t work — no matter how badly zealous advocates of SSI want it to. That is why Trinsic is no longer a general-purpose verifiable credential infrastructure company.

While I don’t expect a universal standard for digital IDs will happen anytime soon, new digital IDs continue to roll out every day. These digital IDs are sometimes built with VCs, other times with mDLs, but usually in proprietary ways. Some are bound with biometrics, others with passkeys. Some are focused on solving a problem in a specific industry, others in a specific geography.

Today, the Trinsic Identity Acceptance Network represents the future of Trinsic. Instead of helping companies create digital IDs (issue verifiable credentials or create wallets for users), we help businesses accept existing digital IDs. Our strategy is a bet on continued fragmentation of the ID landscape — a bet on no single standard winning out.

In fact, I’ve become convinced that Trinsic’s current strategy to help businesses accept digital credentials is actually a necessary stepping stone to a future world powered by interoperable digital credentials. We’re still ushering the world in that direction, just from a different angle.

Of course, I could be wrong, and I hope I am. My ears and eyes are wide open for new information. My only objective is to see reality as clearly as I can. If you have information you believe I’m missing, I’d love to hear from you and have a conversation. Sincerely! You can DM me on LinkedIn or Twitter, or shoot me an email riley@trinsic.id.

Thanks to Kim Hamilton Duffy, Gerald Glickman, Timothy Ruff, Eve Maler, James Monaghan, Dave Grantham, and Zachary Jones for giving feedback on a draft of this post.

Sunday, 13. October 2024

Michael Ruminer

AI “its got legs”

Compliments of FLUX schnell This last week I spoke with two folks on AI intersection within their work and how their work intersects with one another. One was a CPO for a startup that is bringing AI into their life sciences products in a forefront way. The other was a compliance manager for a pharma company. The second happens to be my wife. For me, their work intersects. They both certainly g
Compliments of FLUX schnell

This last week I spoke with two folks on AI intersection within their work and how their work intersects with one another. One was a CPO for a startup that is bringing AI into their life sciences products in a forefront way. The other was a compliance manager for a pharma company. The second happens to be my wife. For me, their work intersects. They both certainly got me thinking harder about AI agents. The first of the two was breaking down knowledge silos in organizations and I definitely saw a play for AI agents and the use of tools by those agents in their approach. The second needed some exuberant discussion on the potential of how AI can contribute to their organizational goals and needs; and without mansplaining, I was glad to help. :-) The conversations only reinforced in me where we are headed in AI adoption.

There were discussions on trend analysis, small language models, retrieval-augmented generation (RAG), and how AI agents and tools work to bring different knowledge repositories into a single interface with human consumable outputs, just to name a few topics. Surprisingly or not, a lot of these topics were not with the CPO but with the wife; putting the theory into practical examples. It was motivational to me.

I have been looking for good, practical, and real-world examples of AI agenic tools to work on as knowledge-expanding exercises; whether they work or, in the end, surface the immaturity of the technology. I don’t get especially motivated by the common and tired examples of financial analysis, LinkedIn scraping for recruiting, or travel booking scenarios that every agent example seems to rely on. These discussions were a step forward.

These topics reinforced with me that for AI and its agents — “its got legs”.

Saturday, 12. October 2024

Heres Tom with the Weather

Thursday, 10. October 2024

Jon Udell

Mix Human Expertise With LLM Assistance for Easier Coding

There are plenty of ways to use LLMs ineffectively. For best results, lean into your own intelligence, experience, and creativity. Delegate the boring and routine stuff to closely supervised assistants whose work you can easily check. Mix Human Expertise With LLM Assistance for Easier Coding Part of the LLM series at The New Stack.

There are plenty of ways to use LLMs ineffectively. For best results, lean into your own intelligence, experience, and creativity. Delegate the boring and routine stuff to closely supervised assistants whose work you can easily check.

Mix Human Expertise With LLM Assistance for Easier Coding

Part of the LLM series at The New Stack.

Wednesday, 09. October 2024

Justin Richer

GNAP: A Conversation of Authorization

After five years of standardization work, GNAP is now officially RFC9635! This long and intense process actually started a few years prior to that, when I was talking with a lot of folks in the security industry about some of the shortcomings of OAuth 2.0, and what we could do about them as an industry. These conversations led to the XYZ proposal (and implementations) which eventually led to the f

After five years of standardization work, GNAP is now officially RFC9635! This long and intense process actually started a few years prior to that, when I was talking with a lot of folks in the security industry about some of the shortcomings of OAuth 2.0, and what we could do about them as an industry. These conversations led to the XYZ proposal (and implementations) which eventually led to the formation of the GNAP working group along with a bunch of others. In particular, the work that Fabien Imbault, Yaron Sheffer, Leif Johannsen, and Aaron Parecki put into the documents and conversations in the working group over these years.

I’m really proud of what we’ve built in GNAP. One of the core tenets of GNAP was to look at the world of OAuth and surrounding technologies and figure out how we could do a lot of that better. It’s been great to see GNAP getting applied in a bunch of places over the web, from payments to key management, and especially in places where OAuth doesn’t reach as well. While OAuth remains deeply entrenched over the world, and likely will be for some time, the community has learned many things from GNAP. Alot of things that started in GNAP have been making their way back to the OAuth ecosystem in some form.

The most obvious of this is RFC9396: OAuth Rich Authorization Requests. This replacement of OAuth’s scope parameter was a direct and intentional backport of what became GNAP’s resource access rights, which also acronyms to RAR. In the OAuth world, we don’t get some of the clean features of GNAP, like being able to substitute strings for objects as a shorthand, but a lot of the core enhancements are there.

We’re also seeing yet another intent registration addition to OAuth 2 (on top of the pushed authorization request, device grant type, and CIBA extensions), and this one mimics a lot of the flexibility of GNAP’s interaction system. It’s a more narrow use case in the OAuth specification, but it’s clear that the pattern that GNAP was built on is here to stay.

And then there’s RFC9421: HTTP Message Signatures. This is work that started independently from GNAP but grew up around the same time, and GNAP utilizes HTTP Message Signatures as a core security function. I don’t think we’d have gotten the signing spec to be as robust as it is without some of the GNAP key proofing use cases driving the discussion.

And finally, the GNAP Resource Servers document has just passed IESG review and is on its own way to becoming an RFC as well. This document represents key abstractions in how and RS and AS relate to each other, and I hope we can continue to build this out and pull the best ideas out into the world.

The GNAP working group is shutting down now that its core work is done, but GNAP is far from over. I look forward to seeing it grow into its spaces, and serve as a beacon of how a delegation protocol can be engineered and built.


Just a Theory

PGXN v2 Update

A lot has happened in he five months since the last PGXN v2 update. The time has been used for continuing community discussions, planning, designs, and the start of implementation. Read on for a full accounting.

Speaking of PGXN news, I neglected to link to this post I wrote for the Tembo Blog last month, a fairly detailed accounting of what’s been happening on the PGXN v2 project:

Forgive me Postgres community, for it has been five months since my last PGXN v2 Update. In my defense, it has been super busy! The time went into ongoing community discussions, planning, designs, and the start of implementation. Join me below for the lowdown.

A few highlights:

PGXN RFCs Repository and rfcs.pgxn.org Binary Distributution POC and OCI POC Extension Ecosystem Summit API and ABI guidance pgxn_meta v0.1.0 PGXN Meta JSON Schemas project plan

There’s been quite a bit of activity since then, including the aforementioned PGXN RFC–5 — Release Certification. More soon!

More about… PGXN

PGXN Certifications RFC

A request for comments on a new PGXN RFC for signing releases, plus a link to an initial implementation.

A couple weeks ago, I drafted PGXN RFC–5 — Release Certification, which proposes to replace the simple inclusion of a SHA-1 hash digests in PGXN release META.json files with a JWS-signed release payload. From the introduction:

This RFC therefore proposes to extend v2 distribution metadata with a single additional property, certs, that contains one or more certifications that attest to the authenticity or other characteristics of a release on PGXN.

The certs value is an object that contains at least one property, pgxn, which itself contains a PGXN-generated RFC 7515 JSON Web Signature in the JWS JSON Serialization format. The pgxn property will allow clients not only to assemble the release URL and verify the downloaded file against checksums, but also validate it against a public key provided by PGXN.

The design allows multiple signatures, certifications, or other attestations, which in the future MAY allow authors or other entities to sign releases with their own keys. The new format appends a structure such as this to the distribution META.json file:

{ "certs": { "pgxn": { "payload": "eyJ1c2VyIjoidGhlb3J5IiwiZGF0ZSI6IjIwMjQtMDktMTNUMTc6MzI6NTVaIiwidXJpIjoiZGlzdC9wYWlyLzAuMS43L3BhaXItMC4xLjcuemlwIiwiZGlnZXN0cyI6eyJzaGE1MTIiOiJiMzUzYjVhODJiM2I1NGU5NWY0YTI4NTllN2EyYmQwNjQ4YWJjYjM1YTdjMzYxMmIxMjZjMmM3NTQzOGZjMmY4ZThlZTFmMTllNjFmMzBmYTU0ZDdiYjY0YmNmMjE3ZWQxMjY0NzIyYjQ5N2JjYjYxM2Y4MmQ3ODc1MTUxNWI2NyJ9fQ", "signature": "cC4hiUPoj9Eetdgtv3hF80EGrhuB__dzERat0XF9g2VtQgr9PJbu3XOiZj5RZmh7AAuHIm4Bh-rLIARNPvkSjtQBMHlb1L07Qe7K0GarZRmB_eSN9383LcOLn6_dO--xi12jzDwusC-eOkHWEsqtFZESc6BfI7noOPqvhJ1phCnvWh6IeYI2w9QOYEUipUTI8np6LbgGY9Fs98rqVt5AXLIhWkWywlVmtVrBp0igcN_IoypGlUPQGe77Rw" } } }

Review and feedback would be very much appreciated, especially on the list of unresolved questions toward the end.

Thanks to David Christensen and Steven Miller for the early reviews!

Meanwhile, I’ve released pgxn_meta v0.4.0, which adds support for this format, as well as code to rewrite PGXN v1 release fields to the new format. It doesn’t actually do signature verification, yet, as the server back end hasn’t been updated with the pattern and PKI. But I expect to modify it in response to feedback and get it implemented in early 2025.

More about… Postgres PGXN RFC JWS

⛰️ Postgres Ecosystem Summit EU

The sequel to the successful PGConf.dev event, the Extension Ecosystem Summit EU will showcases some exemplary extension use cases.

Given the success of the Extension Ecosystem Summit at PGConf.dev back in May, my colleague Floor Drees has organized a sequel, the Extension Ecosystem Summit EU on Tuesday, October 22, at the Divani Caravel Hotel in Athens. That’s “Day 0” at the same hotel as PGConf.eu. Tembo, Percona, Xata, and Timescale co-sponsor.

While the May event took the form of an open-space technology (OST)-style unconference aimed at extension developers, the EU event aims to inform an audience of Postgres users about the history and some exemplary use cases for extensions. From the invite:

Join us for a gathering to explore the current state and future of Postgres extension development, packaging, and distribution. Bring your skills and your devices and start contributing to tooling underpinning many large Postgres installations.

Jimmy Angelakos - pg_statviz: pg_statviz is a minimalist extension and utility pair for time series analysis and visualization of PostgreSQL internal statistics. Adam Hendel (Tembo) - pgmq: pgmq is a lightweight message queue. Like AWS SQS and RSMQ but on Postgres. Adam is pgmq’s maintainer since 2023, and will present a journey from pure Rust → pgrx → pl/pgsql. Alastair Turner (Percona) - pg_tde: pg_tde offers transparent encryption of table contents at rest, through a Table Access Method extension. Percona has developed pg_tde to deliver the benefits of encryption at rest without requiring intrusive changes to the Postgres core. Gülçin Yıldırım Jelínek (Xata) - pgzx: pgzx is a library for developing PostgreSQL extensions written in Zig. Mats Kindahl (Timescale) - TimescaleDB (C), [pgvectorscale] (Rust) and pgai (Python): maintaining extensions written in different languages.

I will also deliver the opening remarks, including a brief history of Postgres extensibility. Please join us if you’re in the area or planning to attend PGConf.eu. See you there!

More about… Postgres PGXN Extensions PGConf Athens Summit

Tuesday, 08. October 2024

Michael Ruminer

Sometimes It’s All About The Chunking

As I continue my study and experimentation with coding up AI solutions, and especially, at the moment, with Retrieval-Augmented Generation (RAG), I decided to work with a post from the Metadocs blog titled “Simple Agentic RAG for Multi Vector stores with LangChain and LangGraph”. It seemed it would cover two areas of interest, agentic operations and RAG. Little did I expect to learn a valuable les

As I continue my study and experimentation with coding up AI solutions, and especially, at the moment, with Retrieval-Augmented Generation (RAG), I decided to work with a post from the Metadocs blog titled “Simple Agentic RAG for Multi Vector stores with LangChain and LangGraph”. It seemed it would cover two areas of interest, agentic operations and RAG. Little did I expect to learn a valuable lesson in chunking. In this post I’ll pass along the obvious but well demonstrated lesson I gathered in the process.

It started with the prior mentioned post that referred to a prior post that it built upon. Following a link to that pre-requisite post, “Create a Langchain app with multiple vector store the easy way”, it in turn referenced an even earlier post as a pre-requisite. So down that rabbit hole I went. The earlier post was “Deploy a RAG app with Langchain in minutes”. I read the earliest of the three posts and it was a very simple RAG application. I coded it up ensuring I understood each line along the way. Most notable was that it was splitting the text into chunks on “\n\n”. I hadn’t looked at the source document they were providing as a sample. It turns out it was a text file of a US State of the Union address with a twist. Each sentence was followed by “\n\n” (two line feed carriage returns); an interesting if unrealistic formatting. I have my own example PDF that I have been using for testing out various RAG implementations and how it handles a specific prompt, so I copied two paragraphs from the document that contains the context I was after and formatted it with a “\n\n” after each sentence. Normally, I have been extracting the text from the PDF as part of the code and then chunking usually with recursive character text splitting, but I didn’t want to change this program since I was going to build on it. When done the results actually returned what I was after, a list of the 10 principles of SSI.

For no apparent reason, I decided to edit the text file and format with a single “\n” after each paragraph. This should return the same results if I edited the text split to represent this. It didn’t. I was, and still am, perplexed by this. It makes no sense that a double line feed split should return any different results than a single line feed results under the circumstances. I plan to revisit this as I believe I must be wrong despite trying multiple times. What was most important in the process was that with the right chunking, as simple as it was, I got the desired results when prompted whereas in all my past experiences it had failed. There was a difference in that I was reading a text file versus using a PDF text extractor and that I was using only two paragraphs focused on the context I wanted versus 70 pages of an academic paper that is probably very hard to extract even if the proper area of context was two clean paragraphs of text within that PDF. The real lesson for me is showing how chunking is so important. I suspect the major differential in the success was in the chunk divisions. I won’t rule out the simpler PDF as a contributor.

Next, I plan to try a few things in this naive RAG implementation before I move on to the multi-vector store — a PDF creation of just the two paragraphs that contain the needed context and split on paragraphs (\n) to see how that comes out. I’ll try the two paragraphs in a PDF with text extracted and chunked using RecursiveCharacterTextSplitter and separators=[“\n\n”, “\n”, “. “, “ “, “”] and a chunk size of 1000 and two different settings for overlap (0, and 200) as well as with SentenceTransformerEmbeddingFunction and then the default OpenAi embedding function. Let’s see how all those combinations work.

To recap, though I can’t explain why I got wildly different results depending on the parsing character used with the tex file format changed, I can suspect the simple chunking by sentence made a lot of difference. The other likely impacting result was clean simple text versus PDF-extracted text. I plan to experiment more and will report back the results. A take away for me, even if it was not entirely or even primarily the impactful element, was how important the chunking is for good results.

Monday, 07. October 2024

FACILELOGIN

The lessons learned in building a secure, scalable, and reliable identity platform @ DevRev

Image credits: https://www.networkrailmediacentre.co.uk/resources/ap-0409 At DevRev, we are building an API-first dev-centric platform that gives you one unified view of your customers and products by connecting your data, teams, and users to our AgentOS platform and app experiences. This blog post shares some insights into how we built (and keep evolving) a secure, scalable, and reliable identity
Image credits: https://www.networkrailmediacentre.co.uk/resources/ap-0409

At DevRev, we are building an API-first dev-centric platform that gives you one unified view of your customers and products by connecting your data, teams, and users to our AgentOS platform and app experiences. This blog post shares some insights into how we built (and keep evolving) a secure, scalable, and reliable identity platform at DevRev. The decisions we made and the lessons we learned throughout this journey, we believe, would be equally applicable to most SaaS companies. I would like to acknowledge and thank Akanksha Deswal, and the DevRev identity team, who were part of this journey, and instrumental in figuring out what works best for us.

An identity platform serves as a secure bridge between users and the services they access — whether apps, APIs, or microservices — delivering a seamless and trustworthy way to manage, verify, and protect user identities in increasingly interconnected environments. While the expectations for an identity platform can vary depending on specific use cases, at DevRev, we primarily focused on the following core areas.

The expectations for an identity platform can vary depending on specific use cases; and at DevRev, we primarily focused on the above core areas.

The decision to buy or build components of an identity platform depends on several factors, such as business requirements (both functional and non-functional), cost at scale, available resources, in-house expertise, and more. We wanted to maintain complete control over our object model (organizations, users, groups, etc.) while delegating more generic identity capabilities to an external identity service (identity provider). Having control over the foundational object model is essential for innovation, and allowing a third party to dictate its structure or limitations can stifle growth and introduce significant risks.

A few years ago, I enjoyed reading Ask Your Developer: How to Harness the Power of Software Developers and Win in the 21st Century by Jeff Lawson. In the book, Jeff reframes the classic ‘build vs. buy’ debate into a more urgent choice: ‘build vs. die.’ As every company evolves into a software company, the true competitive advantage lies in the software they build. When software becomes the critical interface between our services and our customers, not building it to meet the exact needs means risking irrelevance — or worse, failure.

Building doesn’t always mean starting from scratch. We shouldn’t reinvent the wheel if existing solutions meet our needs. Instead, focus on developing what’s core to our business — the components that give us a competitive edge. Everything else, the foundational components that enable us to build our vision, can be sourced from the digital supply chain. I touched on this concept in the blog post, The Next TCP/IP Moment in Identity.

We had no interest in building identity federation standards like OpenID Connect or SAML, nor did we want to develop authentication protocols in-house. These are commodity features supported by almost all identity providers. However, we wanted to ensure the external identity service handling federation and authentication remained a ‘thin’ layer, separate from our business logic. This approach minimizes vendor lock-in.

Vendor lock-in isn’t just about making it easy to switch providers — though that’s certainly part of it. More importantly, it’s about retaining the freedom to innovate independently, which was our primary focus. Within the DevRev platform, Janus serves as the identity service, managing the identity object model and interacting with the external identity provider during organization and user onboarding flows. For the rest of the DevRev platform components, the external identity provider remains a black box, only interacting with Janus.

Choosing the right identity provider requires a thorough and thoughtful evaluation. Our objective wasn’t to find an identity provider that perfectly matched the DevRev object model but rather to focus on its core constructs, their relationships, and the integration effort with the DevRev platform.

In the DevRev platform, each organization can choose its preferred authentication method. For example, one organization might opt for Google login, while another may use their identity provider via SAML. The external identity provider’s object model must support this flexible relationship between organizations and their connections. For instance, the connection to Google (social) is made using OpenID Connect, and ideally, we should be able to reuse that Google connection (or any other social connection) across multiple organizations.

This means the identity provider’s object model should allow connections to be defined independently of a specific organization and provide the ability to associate them with any org. During our evaluation, we encountered one identity provider that could only define a connection within the scope of an individual organization (or tenant), which led us to reject it.

Apart from key functional requirements for authentication and identity federation, we also worried about the scalability, availability, reliability, testability, compliance, and interoperability of the identity provider, and of course the cost at scale. We picked Auth0, mostly because of the lightweight organization model it had and it could meet our requirement to scale the number of organizations to 1 million. Most of the prominent identity providers do support almost all the key identity federation and authentication needs. Only in non-functional requirements and object relationships, you would find the differentiators.

In our hunt for an external identity provider, we mostly looked for a SaaS product. Going for a SaaS product gave us the freedom to focus on our core business problem, and delegate anything related to the external identity provider to the SaaS vendor. A key reason one would pick an on-prem product over a SaaS product is the freedom to do heavy customizations. Building heavy customization in the identity provider is something we wanted to avoid from day 1.

Then again, I am not completely ruling out identity provider on-prem deployments. It would depend on the industry you are in and your business-specific needs. For example, highly regulated industries would pick an on-prem identity provider to keep all their customer data within their boundaries. I led the development of the open-source WSO2 Identity Server for almost 14 years, before joining DevRev, and saw many large-scale successful on-prem deployments.

When picking a SaaS identity provider, non-functional requirements play a key role. We have little control over the non-functional requirements, and even from the SaaS vendor’s point of view, they will find it hard to accommodate change requests related to non-functional requirements; as it could require core changes in their product. For example, Auth0 offers an availability of four 9’s. When you create a tenant in Auth0, it’s bound to one region, and internally they create a replica of that tenant in another availability zone. However, when the primary Auth0 region is down, we do not have the control to switch to the corresponding availability zone. It’s the Auth0 team that decides when to switch based on the severity of the incident. Auth0 also offers a private cloud deployment, but, its a costly option.

Another limitation we found in Auth0 (and of course in most of the other prominent SaaS identity providers as well) replication of data between regions. For example, when you pin your tenant to the Auth0 US-1 region, all the API calls from any region globally must be routed to the US-1 region. Due to this limitation, we’ve witnessed increased latency levels in login API calls (OpenID Connect) for the users connecting from Asia. This hurts the app load time and at the moment we are in the process of building a solution in-house to minimize the impact.

The DevRev platform is built with 250+ microservices running on Kubernetes. Janus is one of them. Each service has its CI/CD pipeline, which deploys each commit to main, to Prod after running end-to-end tests in Dev and QA. We’ve integrated Auth0 into the Janus integration tests. We have a dedicated Auth0 tenant for that, and in the CI/CD pipeline, we connect to Auth0 via the API to create organizations and users; and then associate users with organizations. Once the tests are complete, we run a clean-up task to remove the resources created in Auth0, as it has certain resource restrictions.

There was a time when the clean-up task failed to run and unfortunately went unnoticed. This filled up Auth0 resources and soon reached its limits. Auth0 has a limit on the size of the app metadata that can be associated with a user. We used the app metadata to associate the DevRev-generated organization identifier with an Auth0 user. Once we hit the limit, the Auth0 system became unstable, and none of the data in the test tenant could be accessed either via the UI or the API. This became a blocker for the prod promotion of the Janus service and all other services that relied on Janus for testing. As a quick workaround (while the Auth0 team was working on recovering the tenant), we had to spin up a new Auth0 tenant and use that in our tests. Usually, these limits enforced by Auth0 are way beyond our production needs, and we encountered this issue due to the failed clean-up task from our end.

Auth0 has a rate limit on its management API. During our tests, we used this management API to create organizations and users. Due to the nature of the tests, we started to hit the rate limits (even with proper retries) which resulted in some flaky tests. As a solution, to this and the resource limit issue we discussed before, we ended up mocking Auth0 in our integration tests, rather than directly hitting the Auth0 test tenant.

We follow GitOps at DevRev to automate and manage infrastructure and application deployments. Git is the single source of truth. This helps us to take any change via a review process and audit all changes. We followed the same model with Auth0, where appropriate. For example, we use Auth0 actions to inject the DevRev-generated org/user identifiers into the tokens it produces. The actions are Javascript code and we keep it in a Git repo and deploy to the Auth0 Prod tenant via Dev and QA. This helped us avoid any manual edits from the Auth0 management console, and keep all three environments consistent.

Currently, not all operations on Auth0 are fully managed through GitOps. For example, we still update certain settings, such as token lifetimes for applications, directly through the Auth0 management console. Although these are infrequent tasks, it’s essential to have a complete audit trail in production for every operation and change made. While Auth0 provides logs, they are only retained for a month. To ensure long-term visibility, we push Auth0 logs to Datadog and set up Slack alerts for specific cases. Additionally, we’re exploring the use of the Auth0 Terraform provider to automate and manage all Auth0 operations via GitOps.

Passwords are painful, not just from the user’s point of view but also from the product side. If an app has to support password-based login, it must also build the supporting infrastructure to recover passwords, rotate them periodically, implement strong second-factor authentication, and so on. From day one, we made a design decision to avoid passwords.

We use Auth0 as an identity bridge. The contract between the DevRev app and Auth0 is defined by OpenID Connect. Auth0 helps us connect multiple other identity providers via SAML and OpenID Connect to authenticate users. These identity providers are either the social identity providers or the enterprise identity providers owned by DevRev customers. Following the identity bridge pattern helped avoid storing user passwords, and also introducing a new identity provider or an authentication method requires no changes to the DevRev app. It can be done transparently.

This graph shows the growth of unique monthly active Dev users by connection type over the last 12 months. The growth in active users is healthy, with enterprise connections starting to dominate.

The identity bridge pattern effectively addresses the common challenges posed by the spaghetti-identity and identity-silos antipatterns. Spaghetti identity occurs when a SaaS application tries to establish direct, point-to-point integrations with multiple identity providers, leading to complex, tangled connections. On the other hand, identity silos arise when an application is limited to a single federation or authentication protocol, making it difficult and costly to introduce new protocols in the future. By adopting the identity bridge pattern, organizations can simplify integration and enable flexibility in supporting multiple protocols without the downsides of these antipatterns.

It’s also worth mentioning how we leveraged the identity bridge pattern to overcome a limitation in Auth0. Auth0 supports passwordless authentication with email OTP; however, it cannot be used on its own with Auth0 organizations — only as a second factor. This limitation likely arises from Auth0’s architecture, as the organization model was introduced later. To overcome this and use email OTP as a passwordless method, we spun up another Auth0 instance without organizations and then federated to it from the primary Auth0 tenant (which has organizations enabled). While this approach works, it is far from ideal. We anticipate switching to native passwordless email OTP within our primary Auth0 tenant as soon as that feature becomes available.

Auth0 provides the latency numbers it introduces during the login operations; however, that does not reflect the latency the users experience at the edge. To address this concern, and also to have better visibility into the OpenID Connect login flow, we started routing all login calls to Auth0 via our CDN provider, which is Fastly. On the Fastly Compute@Edge platform, we run an edge gateway, which pushes all the API stats to Google BigQuery for further analysis. There we would know the latency at the edge corresponding to all the login operations. These latency numbers are very much closer to what the users experience. The following graph shows the p90 latency numbers in milliseconds for the last 31 days against a set of selected regions, for the Auth0 token endpoint.

p90 latency numbers in milliseconds for the last 31 days against a set of selected regions, for the Auth0 token endpoint

All DevRev applications utilize the OpenID Connect authorization code flow. The token endpoint, highlighted in the graph above, is called once during the initial app load and periodically thereafter for token refreshes. While the periodic refreshes happen asynchronously and do not affect the user experience, the latency of the initial token request during page load is more critical.

Two main factors contribute to this initial latency:

Geographic latency — All users, regardless of location, connect to a centralized Auth0 instance in the US-East region. Web-worker-based login flow — The DevRev web app, a single-page application (SPA), leverages this flow, which adds complexity and impacts performance during authentication.

We opted for the web-worker-based login flow to enhance security by storing user tokens in browser memory more securely. However, web worker memory is scoped to a single browser tab, which means that even if a user has an active Auth0 session, opening a new tab requires calling both the authorize and token endpoints during the initial page load. Upon analyzing the stats, we found that 91.1% of the calls to the Auth0 authorize endpoint were from users who were already authenticated. To address this, we developed an edge-based solution targeting these 91.1% of users, aiming to reduce the latency at the edge to almost zero. As of this writing, this solution is being tested in our development and QA environments and will soon be available in production.

91.1% of the calls to the Auth0 authorize endpoint were from users who were already authenticated (page reloads). The users once logged in to the app, keep the login session. This graph shows the average number of active vs silent logins by weekday for the last 90 days. The edge-based solution we are working on will reduce the latency at the edge for the login calls for already authenticated users by almost 100%.

In addition to publishing stats related to Auth0 API performance from the edge to Google BigQuery, we also send logs to Datadog. This allows us to trigger alerts in case of Auth0 failures and detect downtimes early. Moreover, this helps us identify which users and organizations are impacted during Auth0 outages — events that have occurred a few times in the past couple of years.

The contract between all the DevRev apps and the identity provider is based on OpenID Connect. However, we didn’t find the ID token to be particularly useful in the case of an SPA. An SPA is simply a “dumb” app or a public client, which means it cannot make any trustworthy decisions on its own. The access token is the key! (If you’re interested in learning more about the difference between the ID token and the access token, please check out this video.)

We use self-contained access tokens (JWTs), which include the user context with every request. These tokens have been widely adopted in the industry and were formalized as an IETF standard in 2021 (RFC 9068). While Auth0 has yet to support RFC 9068, this has had no impact on our use cases. In fact, for an SPA, using reference tokens (the other alternative to self-contained access tokens — also known as opaque access tokens) is not a viable option. Only the issuer of an opaque token can validate it, and it’s impractical for the gateway intercepting API requests to communicate with the issuer for token validation, for each request.

When using self-contained tokens, we also need to implement support for revocation. Unlike self-contained tokens, when a reference token is revoked, that request goes to the token issuer. The consumer of the token (such as a gateway) would be aware of the revocation because it communicates with the token issuer each time it validates a token. However, there’s no point in communicating with the issuer to revoke a self-contained token unless there’s a reliable way to propagate the revocation decision to all dependent systems. To address this, we introduced the auth-tokens.delete endpoint, allowing us to revoke access tokens upon user logout. We also maintain a cache of the revoked token IDs, with a TTL based on the token’s expiration.

Returning to the topic of the ID token, the DevRev app relies on the dev-users.self API to identify the user. Additionally, another reason we can't rely on the ID token for user identification is that Auth0 cannot embed the necessary user information into the ID token, as we store only a minimal set of user data in Auth0.

Most of the support queries we receive from our customers related to login are due to some kind of an issue with the OTP delivery. Even though the number of such queries is quite low (compared to the success cases), when it happens, it’s painful to the users and hurts the business. Most of the DevRev customers at the stage of evaluation use email OTP-based login and then later switch to login with their identity provider, with SAML or OpenID Connect. Apart from our direct customers, we also offer a support portal for our customers’ customers (who we call Rev users), which also offers login with email OTP.

Most email OTP-related issues arise from one of the following causes:

The user’s email is added to the email provider’s global suppression list. The OTP email is marked as spam. The OTP email is rejected by the user’s mailbox due to internal domain restrictions, or other similar factors.

Email service providers (ESPs) maintain global suppression lists to prevent sending emails to addresses that have previously bounced (due to invalid addresses) or opted out of receiving emails from certain senders. If a user’s email address is on such a list, the OTP email won’t be delivered. This can happen if the user’s email previously encountered delivery issues, such as soft or hard bounces.

Initially, we used SendGrid as our ESP for sending OTP emails as well as marketing emails. Although we used two separate SendGrid accounts for these purposes, SendGrid maintains a global suppression list shared across accounts when emails originate from the same domain — devrev.ai in our case. This meant that if a user unsubscribed from marketing emails, they were automatically added to the global suppression list, preventing them from receiving OTPs. In some cases, users didn’t even unsubscribe themselves; certain plugins handled it automatically.

This behavior was undesirable, as it significantly impacted OTP delivery. To address the issue, we switched to AWS SES for sending OTP emails, which reduced global suppression list-related problems by nearly 90%.

We once encountered a particularly interesting issue related to email OTPs, and while it wasn’t a delivery problem, it’s worth mentioning. The user received the OTP email, but every time they tried entering the OTP, it failed. What made this case even more intriguing was that we discovered the OTP had already been attempted from a different IP address just before the user tried it. This explained why the OTP kept failing — the user was attempting to use an OTP that had already been used.

After further troubleshooting, we discovered the root cause. Along with the OTP in the email, we had also embedded an OTP link that allowed users to log in directly by clicking it. Although this link was commented out in the HTML template and not visible to the user, the organization this user belonged to had strict security protocols that automatically scanned and clicked on links embedded in incoming emails. This security bot didn’t distinguish between commented-out links and visible ones, so it clicked the hidden link, sending a request to the Auth0 server and invalidating the OTP before the user could use it. The issue was resolved by completely removing the commented-out OTP link from the email template.

Many email providers have spam filters that automatically classify certain emails as spam based on various criteria, such as the content of the email, sending frequency, or the sender’s reputation. If the OTP email is flagged as spam, it ends up in the user’s spam or junk folder, leading to the user not receiving it in their primary inbox. This could occur if the email provider deems the sender domain as suspicious or if the email contains certain keywords that trigger spam filters. After moving from SendGrid to AWS SES and then carefully designing the email template, we could get the number of spam emails almost down to 0.

Every organization and user in the DevRev platform is assigned a unique, immutable, and persistent pseudonym known as a DON (DevRev Object Name). Every resource in the platform has its own DON. The format of a DON is: don:<service>:<partition>:(<type>/<id>)+, inspired by Amazon Resource Names (ARN).

For example, don:identity:dvrv-us-1:devo/xyz is the DON of an organization. Here, identity refers to the service name, and dvrv-us-1 is the partition identifier, which indicates the organization’s location. For example, an organization in the us-east-1 region has dvrv-us-1 as its partition ID, while one in ap-south-1 has dvrv-in-1.

The type field of the DON defines the type of the object it is attached to. Every key entity within the DevRev platform is associated with an object, and all objects share a common ancestor known as the Atom object. For example, a devo object type represents a Dev organization, while devu represents a Dev user. A Dev organization is a company or team that uses the DevRev platform, and its members are referred to as Dev users. Customers of a Dev organization are called Rev users, who belong to Rev organizations (also known as workspaces). Both Rev organizations and Rev users operate within the scope of a Dev organization. For instance, the DON of a Rev organization would be: don:identity:dvrv-us-1:devo/xyz:revo/pqr.

All identity objects in the DevRev platform follow a predefined schema, ensuring consistency and standardization across all organizations. This common schema facilitates smooth integration and uniformity across the platform. However, recognizing that different organizations may have unique requirements, we also provide the flexibility to extend the Dev user and Rev user objects with custom fields specific to a given Dev organization.

Customizability is essential for organizations that need to tailor their identity models to accommodate unique workflows, industry requirements, or specific customer data needs. For instance, a Dev organization might need to capture additional fields such as department codes, job roles, or region-specific preferences that go beyond the standard schema. Moreover, when importing Rev user objects from external systems like Salesforce or Zendesk, these objects may come with their own set of attributes. The ability to extend and adapt the schema allows organizations to seamlessly integrate and migrate from these external systems to the DevRev platform.

All personally identifiable information (PII) of DevRev users is stored exclusively in Janus, making it the single source of truth for PII. Other services in the platform reference users through their DONs. For example, when a client calls the works.get API to retrieve a work item, the request goes through the DevRev gateway, which makes a gRPC call to the corresponding service. The service returns the work item data, including the DONs of the users who created and are assigned to the item.

The DevRev platform is built with 250+ microservices running on Kubernetes. Fastly Compute@Edge serves as the entry point at the edge for all DevRev services. At the origin, the DevRev API gateway intercepts all incoming traffic. Once the gateway verifies the JWT accompanying an API request, it dispatches the request to the appropriate service.

Since raw user DONs are not user-friendly, the gateway resolves them into user details, such as display name, email, and full name, by querying Janus (the API composition pattern). These user summaries are cached in Redis to avoid repetitive calls to Janus (from the gateway), ensuring faster response times for future requests.

A DON attached to a user or an organization is an immutable identifier. It’s not just immutable, but also resolvable by its own — or embeds information in it. For example, we use the partition ID embedded into the organization DON to route requests to the corresponding region of the organization, in our multi-regional routing implementation built at the edge. Designing a system based on immutable identifiers needs to be done with care because the cost of a bad design decision is high. For example, we embed the Dev organization ID into the user DON, which means we cannot move this user to another Dev organization or a user cannot be part of multiple Dev organizations. This is a conscious decision we made to scope all the resources in the DevRev platform under a Dev organization.

However, we made a mistake in our Rev user implementation. The Rev user DON embeds both the Dev organization ID and the corresponding Rev organization ID. This means, a Rev user cannot switch Rev organizations, or cannot be part of multiple Rev organizations. This was not a requirement initially, but as we kept learning from our customers, we figured that it was a too restrictive constraint to limit a Rev user to one Rev organization. We made the Rev user scoped at the Dev organization level and removed the Rev organization ID from the DON. This was a painful change.

The Dev organization ID (don:identity:dvrv-us-1:devo/xyz), which is embedded into a DON is not incremental. An incremental ID can expose sensitive information, such as the total number of organizations created over time. Malicious actors could exploit this to infer patterns about system growth or attempt ID enumeration attacks to access or manipulate unauthorized resources. Non-incremental IDs make it harder to guess or predict other organization IDs, improving security and reducing the risk of ID enumeration.

The randomly generated IDs provide global uniqueness, meaning IDs can be safely generated across distributed systems without the risk of collision. This allows for a more flexible, decentralized architecture where different systems or regions can generate IDs without coordinating with a central system.

We initially used a 48-bit random value as the Dev organization ID. Once base62 encoded, it becomes a string with either 8 or 9 characters. When we moved to the multi-regional deployment, we wanted to ensure the Dev organization ID is unique across all regions by adding a regional prefix, for example, “1” for us-east1. However, since the previously generated Dev organization IDs were already 8 or 9 characters long, this introduced a challenge. A new region could potentially generate an ID with the prefix that results in 9 characters, which could match an already generated ID from a different region, before the introduction of the regional prefix. To address this, we first ensured the base62-encoded 48-bit value was always 9 characters by adding padding, and then introduced a regional prefix on top of that, effectively making the Dev organization ID a fixed-length random string of 10 characters.

What does deleting a Dev organization mean? A Dev organization has many other resources linked to it within and outside the identity space (or Janus). Dev users, Rev users, workspaces, accounts, service accounts, system users, and preferences are all identity-related objects, while conversations, articles, tickets, and issues, for example, are objects outside the identity space.

This is a common problem in a distributed system. What we need is a cascade delete. Implementing a cascade delete in a distributed system requires careful consideration of consistency, availability, fault tolerance, and scalability. Unlike a traditional monolithic system, where database constraints and relationships can directly enforce cascade deletes, distributed systems involve multiple services, databases, and possibly different regions, making the process more complex.

When a Dev organization is deleted, we mark it as soft-deleted. A soft delete marks a Dev organization as deleted without actually removing it from the database. This is, in general, useful to avoid cascading failures in case other services depend on the deleted entity. When a Dev organization is marked as deleted, it triggers a CDC (change data capture) event, and we have a dedicated service (garbage collection service), listening to these events and taking actions based on the type of the object being deleted and the dependent object types.

Once the garbage collection service picks the event to soft delete an organization, it spins up a temporal workflow, which will trigger the cascade delete of the dependent objects after a retention period. As you have figured out already this is a recursive process, and we only need to specify the first level of dependencies.

In general, there are two common saga patterns for cascade delete implementation, orchestration-based saga and choreography-based saga. In the orchestration-based saga pattern, a central coordinator service orchestrates the cascade delete by calling each service that manages dependent objects in a defined sequence. It ensures the cascade completes across all services or triggers compensating actions (e.g., undo the deletion) if a step fails. In the choreography-based saga pattern, each service listens for events and performs its part of the cascade delete, triggering further events to continue the process. We picked the orchestration-based saga pattern over the choreography-based saga.

At DevRev, we leverage a range of databases — including MongoDB, PostgreSQL, and DynamoDB — each selected to address specific use cases. For all identity-related data managed by Janus and the STS (which we’ll discuss later in this blog), we rely on MongoDB. MongoDB is ideal for transactional (OLTP) workloads, excelling in scenarios that demand high write throughput and the ability to manage large volumes of concurrent transactions. Its built-in replication via replica sets provides automatic failover and data redundancy across multiple nodes, enhancing both reliability and fault tolerance. To ensure data consistency, we utilize the majority write concern and read from the primary node. Currently, we are focusing on improving read and write performance in this setup.

MongoDB also offers horizontal scaling through sharding, where each shard operates as a replica set. Data is distributed across shards using a shard key, which is a field (or combination of fields) that determines how MongoDB partitions and routes data. Although we currently operate with a replica set without sharding, we’ve designed each collection in the identity database with a Dev organization ID field that can serve as the shard key, allowing us to seamlessly enable sharding when needed.

Unlike traditional relational databases, which require predefined schema structures, MongoDB’s document-oriented nature supports schema-less design. This flexibility has allowed us to rapidly develop and iterate on identity objects without the need to define a schema or handle migrations upfront.

Along with MongoDB we also use Google BigQuery, which is a fully managed, serverless, and highly scalable data warehouse designed for fast SQL-based queries and real-time analytics on large datasets. We are using the MongoDB Kafka connector to capture change data capture (CDC) events from MongoDB and push them to BigQuery. This also acts as an audit for all changes at the data level.

SCIM support had always been planned but was deprioritized due to other tasks. We’re excited that it is now an integral part of the DevRev identity platform. SCIM offers a standardized protocol that streamlines the exchange of identity information between identity providers and external applications, significantly reducing manual processes and minimizing errors. It ensures that user data is synchronized and consistent across all systems. Furthermore, SCIM enhances security by automating the revocation of user access when employees leave or change roles, reducing the risk of unauthorized access and ensuring proper access management.

DevRev provides a SCIM endpoint for provisioning users and groups from an organization’s identity provider. Initial testing was done using Okta as the identity provider, and the DevRev SCIM integration will soon be available on the Okta Integration Network. Following that, we plan to expand availability to Azure and Google platforms. As a DevRev platform customer, the DevRev organization has already implemented SCIM for integration with Okta, streamlining identity management within the organization.

The identity bridge pattern (which we discussed before) facilitates trust mediation between the identity provider trusted by the DevRev platform (Auth0) and external identity providers that authenticate users from DevRev organizations. This pattern is primarily focused on human identities. To bridge the human identity into the services, we’ve introduced a security token service (STS). The STS implementation is inspired by the RFC 8693. This adds another level of indirection in trust, and all DevRev services only need to trust the STS. You can read more about STS from this blog: Securing north/south and east/west traffic @ DevRev.

STS is a key part of the DevRev identity architecture, which helps to make the identity provider a thin layer, which we discussed earlier in this blog. An Auth0 token tells us who the user is and does not embed any PII data other than the email address. However, when exchanging an Auth0 token for an STS-issued token, we have the flexibility to enrich the token with the data available in the DevRev platform.

The STS is capable of issuing tokens of different types. This graph shows the number of tokens issued by the STS for the last 30 days.

The STS is capable of issuing tokens of different types. For example Personal Access Tokens (PAT) for Dev users, Application Access Tokens (AAT) for service accounts, Rev session tokens for Rev users, and so on. Each of these token types is bound to a set of processing rules. For example, while issuing a Rev session token, the STS talks to Janus, and just-in-time provisions the Rev user, if they do not exist in the system. Another example would be how we handle delegation workflows. When a snap-in wants to act on behalf of a Rev user, it authenticates with its AAT (which represents the snap-in service account) and requests a Rev session token. Also, the STS-issued tokens are used in the multi-regional setup to facilitate certain region-to-region interactions.

In this blog post, we highlighted key aspects of the DevRev identity platform and the lessons we’ve learned throughout its development. This is an ongoing effort, and as we continue to gain insights from our customers, we constantly discover new ways to enhance the platform and tackle exciting challenges in the identity and security landscape.

The lessons learned in building a secure, scalable, and reliable identity platform @ DevRev was originally published in FACILELOGIN on Medium, where people are continuing the conversation by highlighting and responding to this story.

Thursday, 27. June 2024

Just a Theory

Patch: Postgres ABI and API Guidance

Dear Postgres extension developers: Please review and give feedback on the proposed patch adding ABI and API guidance to the C language documentation.

Update 2024-11-14

I forgot to update this post at the time, but on July 31, Peter Eisentraut committed the patch patch ABI and API guidance to the C language documentation. I only noticed because today’s releases contained a modified ABI that broke a number of extensions. See the hackers thread for details.

TL;DR

If you’re a Postgres extension developer interested in understanding what to expect from core API and ABI stability, please review and give feedback on this patch (or pull request) adding ABI and API Guidance to the documentation.

In my PGConf.dev report a couple days ago, I mentioned that a few actionable items came out of the Improving extensions in core unconference session. One was the need to document the heretofore unofficial policy for API and ABI stability between major and, especially, minor versions of Postgres.

A frequent topic at the Extension Summit and Mini-Summits and a number of PCConf sessions has been concern regarding compatibility changes between minor releases of Postgres. At Mini Summit Five, for example, Yurii Rashkovskii presented a few examples of such changes, leading him to conclude, along with several others in the community, that C API-using extensions can only be used when built against the minor release with which they’re used.

In the Unconference session, core committers reported that such changes are carefully made, and rarely, if ever, affect extensions compiled for different minor releases of the same major version. Furthermore, they carefully make such changes to avoid compatibility issues. In the case Yurii found, for example, a field was added to a struct’s padding, without affecting the ordering of other fields, thus minimizing the risk of runtime failures.

It became clear that, although the committers follow a policy — and read new committers into it via patch review — it’s not documented anywhere. The result has been a bunch of sturm und drang amongst extension developer unsure what level of compatibility to depend on and what changes to expect.

The week after the conference, I started a pgsql-hackers thread proposing to document the committer policy. Following some discussion and review of potential ABI breaks in minor releases, the consensus seemed to be that the committers strive to avoid such breaks, that they’re quite uncommon in minor releases, and that most of the reported issues were due to using more obscure APIs.

As a result, we started drafting a policy, and after a few iterations, Peter Eisentraut pulled things together from the perspective of a core team member, reframed as “Server API and ABI Guidance”. I converted it into a patch (and pull request) to add it to the C Language docs. A key statement on minor releases:

In general, extension code that compiles and works with a minor release should also compile and work with any other minor release of the same major version, past or future.

I hope this document clarifies things. Even if it’s not as strict as some might hope, it at least documents the project approach to compatibility, so we have a better idea what to expect when using the C APIs. If you see gaps, or you have additional questions, please respond to pgsql-hackers thread — or the pull request (I’ll propagate comments to hackers).

More about… Postgres Extensions Patch ABI API