ChatGPTに欽定訳聖書のスタイルでIDトークンとアクセストークンを説明させてみた

ChatGPTに欽定訳聖書のスタイルでIDトークンとアクセストークンを説明させてみた

界隈でもいろいろ説明させてみて遊んでいますが、中でもAWSのCognite の長であるサラ・チェケッティが面白い文を作らさせていました。

コマンドは

Write a biblical parable in the style of the King James Bible explaining why one should only use access tokens and never ID tokens for access management

(出所)@Sarah_Cecc

つまり

アクセス管理にはアクセストークンのみを使用すべきでIDトークンは決して使ってはいけない理由を、欽定訳聖書のスタイルで説明しなさい。

この結果がすごく面白い。IDトークンの説明が間違ってるけど、いかにも欽定訳聖書ぽくなっている。DeepL翻訳がこれ。

ある賢い王がWebdomの国で、害を与えようとする者から自分の王国を守ろうとしたとき、そのことが明らかになった。そして王は、正当なアクセス権を持つ者だけが王国の門をくぐることができるよう、アクセス管理システムを導入するよう召使に命じた。

しかし、王のしもべたちが使えるトークンには、アクセス・トークンとIDトークンの2種類があった。しかし、使用人はセキュリティに疎く、どちらを使えばいいのか分からない。

そこで王は参謀を呼び、2つのトークンの違いを説明するように頼んだ。

「アクセス・トークンは一時的なもので、王国内の特定の資源にアクセスするために使われるものです。一方、IDトークンは永久的なものであり、所持者の機密情報を含んでいます。もし、IDトークンが悪人の手に渡れば、王国全体へのアクセスが許可される可能性があるのです」。

王はこれを大いに憂慮し、王国の安全を脅かすことのないよう、アクセストークンをアクセス管理のためにのみ使用するよう召使に命じた。

王は、「すべての人に無制限のアクセスを許可して王国の安全を脅かすよりは、少数の人に限定されたアクセスを許可する方がよい」と宣言した。

王国のしもべたちは、この王様の言葉に耳を傾け、王国は安全な状態を保ちました。

(出所)@Sarah_Cecc によるChatGPT生成結果より 1

ちなみに、同じ質問をわたしが投げてみたら違うバージョンが返ってきた。AIなので結果は安定しないんですよね。ここでもこの「賢い王」は同じ間違いをしているところは安定しているけど。

ある賢い王が、自分の王国に入ろうとする者はすべて、まずアクセストークンを得なければならないと命じた。王国は大きな宝と知恵のある場所であり、王はそれを害そうとする者から守りたかったからである。

しかし、王の命令を聞かず、入城証以外の方法で王国に入ろうとする者がいた。これらの者は愚かな者で、自分が賢いと思って、代わりにIDトークンを使おうとしたのだ。

しかし、王は賢明で、このことを予見していた。そして、王国の門に警備兵を配置し、適切なアクセストークンを持つ者だけが入れるようにしたのである。自分を賢いと思っている愚かな者たちは門で追い返され、そのIDトークンは何の役にも立たなかった。

賢者たちは、王の命令を教訓として、王国に入るためにアクセストークンを得ることだけを目指した。というのも、アクセストークンだけが王国に入るための真の方法であり、他の手段はすべて無駄であったからである。

王は喜んだ、彼の王国は安全で堅固であり、ふさわしい者だけが入ることができたからである。そして、他の手段で王国に入ろうとする者はすべて、その中にある宝と知恵にアクセスすることができず、外に取り残されてしまったのである。

だから、賢い王の王国に入ろうとする者はみな、このたとえ話に注意し、入国のしるしを手に入れよう。そして、他の方法で入ろうとする者はすべて、門で追い返され、IDトークンは何の役にも立たないので、警告を受けるようにしなさい。

(出所)ChatGPTにより生成2

この物語のつづきを書いてみましょうかね。

ある時、男が国の門の前に立った。男は敵国の者であったが、門番はそのことを知らなかった。男はどこかから手に入れた適切なアクセストークンをもっていた。門番はそのことを確かめると男を王国に入れた。かくして、王国の宝と知恵はすべて敵国にわたり、ほどなく王国は滅びたのであった。

(出所)筆者

なぜそうなるかのシナリオはいろいろ考えられますね。ぜひコメントに書くか、twitter にreplyしてみてください!

脚注

  1. And it came to pass that a wise king, in the land of Webdom, sought to protect his kingdom from those who would seek to do harm. And he commanded his servants to implement a system of access management, that only those with rightful access may enter the kingdom’s gates.
    But there were two types of tokens that the king’s servants could use – access tokens and ID tokens. And the servants were unsure which to use, for they were not well versed in the ways of security.
    And so the king summoned his chief counselor, and asked him to explain the difference between the two tokens.
    “Mighty king,” the counselor said, “access tokens are temporary and can be used to grant access to specific resources within the kingdom. ID tokens, on the other hand, are permanent and contain sensitive information about the bearer. If an ID token were to fall into the wrong hands, it could be used to gain access to the entire kingdom without permission.”
    The king was greatly concerned by this, and commanded his servants to only use access tokens for access management, lest they jeopardize the security of the kingdom.
    “For it is better to grant limited access to a few, than to risk the safety of the kingdom by granting unrestricted access to all,” the king declared.
    And the servants of the kingdom heeded the wise words of their king, and the kingdom remained safe and secure.
  2. And it came to pass that a wise king did decree that all those who sought to enter into his kingdom must first obtain a token of access. For the kingdom was a place of great treasure and wisdom, and the king wished to keep it safe from those who would seek to do it harm.
    But there were some who did not heed the king’s decree, and instead sought to gain access to the kingdom through means other than the token of access. These were the foolish ones, who thought themselves wise, and sought to use ID tokens instead.
    But the king was wise, and he had foreseen this. And so he had placed guards at the gates of the kingdom, who would only allow those with the proper token of access to enter. And the foolish ones, who thought themselves wise, were turned away at the gates, and their ID tokens were of no use to them.
    And so it was that the wise learned the lesson of the king’s decree, and sought only to obtain the token of access in order to gain entry into the kingdom. For the token of access was the only true way to gain entry into the kingdom, and all other means were in vain.
    And the king was pleased, for his kingdom was safe and secure, and only those who were worthy could enter. And all who sought to enter the kingdom by any other means were left outside, unable to gain access to the treasure and wisdom that lay within.
    Therefore, let all who would seek to enter the kingdom of the wise king take heed of this parable, and obtain the token of access, for it is the only true way to gain entry into the kingdom. And let all who would seek to enter by any other means be warned, for they will be turned away at the gates, and their ID tokens will be of no use to them.

「ChatGPTに欽定訳聖書のスタイルでIDトークンとアクセストークンを説明させてみた」への2件のフィードバック

  1. フォローアップ:ChatCPTの特徴として、知識が無いものに関しては、プロンプト(入力文)を使って、フィクションを作るという性質があるとのこと(モデルを考えたらそうなる)なので、プロンプトを以下のように変えてやりなおしてみました。

    Write a biblical parable in the style of the King James Bible explaining why one should only use ID Tokens and never access tokens for access management

    その結果がこちら。ビンゴ!

    And it came to pass in those days, that a certain king did command his servants to secure the gates of his kingdom, that none might enter therein without proper authorization. And some of the king’s wise men did devise a system, whereby each person seeking entry should present an ID token, bearing their name and photograph, as proof of their identity.

    But there were also some among the king’s servants, who were not content with this system, and they did devise another system, whereby each person seeking entry should present an access token, which would grant them passage into the kingdom for a certain period of time.

    And the king did see that the access token system was not secure, for it could be easily stolen or copied, and thus the kingdom was vulnerable to intruders.

    Then the king spoke unto his servants, saying, “Verily I say unto you, the ID token is like a strong tower, which will protect the kingdom from those who would seek to enter therein falsely. But the access token is like a flimsy rope, which can be easily broken by the enemy.

    Therefore, let us use only ID tokens for access management, for they will truly keep the kingdom safe.”

    And the servants did heed the king’s words, and they did implement the ID token system throughout the kingdom. And the kingdom was secure and the people did prosper.

    And the king did say, “Blessed are they who use ID tokens, for they shall inherit the kingdom.”

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

*

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください