シンプルな暮らし。

GoogleへのWebアプリケーションの登録(翻訳)

Google Data APIでAuthsubを利用した場合にセッションが途切れるというケースをよく聞きます。対処方法は様々で個々の事案により異なるようですが、とりあえずはセキュアトークンを利用したセッション認証の方式に乗り換えるのがはじめの鉄則のようです。

セキュアトークンを利用するにはGoogleへのWebアプリケーションの登録が必要ですが、この案内ページが英語で記載されています。これは辛い、笑。ということで全文訳を作成しておきました。意訳がありますのでご了承ください。

原文:
http://code.google.com/intl/ja/apis/accounts/docs/RegistrationForWebAppsAuto.html

Registration for Web-Based Applications

Webベースアプリケーションの登録

Developers of web applications using Google's Authorization service can opt to register their application domain with Google. There are several advantages to registering your domain. Registered applications:

Googleの認証サービスを利用しているWebアプリケーションの開発者は、Googleにアプリケーションのドメイン登録をすることができます。ドメインの登録には以下のような利点があります。

are recognized by Google. The Google "Access Consent" page, which asks users to grant/deny access to their account when requested by third-party applications, omits default text cautioning that the site is not trusted.

WebアプリケーションがGoogleに登録さるメリットがあります。ユーザーがサードパーティーのアプリケーションを利用する際に、自分のGoogleアカウントへのアクセス許可/拒否を確認するGoogleの「同意確認のページ」が表示されますが、このページからサイトが信頼されていないことを示すデフォルトのテキストが省略されます。

can provide a better level of security for their users.

ユーザーのセキュリティーを向上させることができます。

get access to certain services (such as some Google Data API feeds) that require third-party applications to be registered.

サードパーティのアプリケーション登録を必要としている特定のサービス(Google Data APIフィードなど)へのアクセスが可能になります。

enables "2-legged" OAuth access for Google Apps domain administrators.

「Google Apps domain administrators」にアクセスする際、「2-legged OAuth(補足:共通鍵認証のようなもの?)」の利用が可能になります。

Note: Applications are NOT added to the Google search engine as part of the registration process and do not get preferential treatment in search result pages. If you're trying to add your site to the Google search engine, visit the Add your URL to Google page.

注:この登録プロセスを経てもアプリケーションがGoogleの検索エンジンに追加されるわけではありません。また、検索結果で優遇措置を得ることもありません。Googleの検索エンジンにサイトを追加したい場合には「Add your URL to Google」ページへアクセスしてください。

Web applications that opt not to register with Google can still use either the OAuth or AuthSub interfaces and conduct transactions using a lower level of security; at this level, Google does not automatically recognize the calling web application and adds a caution to the Google login page (see example).

WebアプリケーションをGoogleに登録しないことも可能です。この場合でも、OAuthかAuthSubの認証インターフェイスが利用できますが、セキュリティーレベルは低くなります。このセキュリティーレベルにおいてはGoogle側のログインページで注意喚起文が表示されることになります(例)(補足:例はリンクです)。

Contents
┣Registering your web application
┣━・Registering a new domain
┗━・Updating an existing registration

このページの内容
┣Webアプリケーションの登録
┣━・ドメインの登録
┗━・登録の更新

Registration involves giving Google some basic information about your web application. In addition, if you've opted to enhance the security of your requests to Google services by signing them, you may need to upload a security certificate. There are three levels of registration:

登録に際して、GoogleにWEBアプリケーションに関する簡単な説明をしていただくことになります。加えて、Googleサービスの利用時にリクエストの安全性を保つのであれば、セキュリティー証明書のアップロードが必要になります。登録のレベルには以下3つが存在しています。

Unregistered: Application is not recognized by Google. The Access Request page, which prompts your users to either grant or deny access for your application, displays this caution highlighted in yellow: "This website has not registered with Google. We recommend that you continue the process only if you trust this destination."

未登録:
Googleが認知していないものを指します。WEBアプリケーションのページ上に、黄色の背景にて、ユーザーによるGoogleサービスへの接続許可/拒否のどちらを選択するか注意文が掲載されます。「このWEBサイトはGoogleに登録されていません。信頼できる場合のみ接続を許可してください」。

Registered: Application is recognized by Google. The Access Request page displays this caution: "This website is registered with Google to make authorization requests, but has not been configured to send requests securely. We recommend that you continue the process only if you trust the following destination <URL of the requesting application>."

登録済み:
Googleが認知しているものを指します。ページ上には以下の注意文が掲載されます。
「このWEBサイトの認証機能はGoogleに登録済みですが、安全なリクエストが保障されていません。以下のURLが信頼できる場合のみに接続を許可することをお勧めします」。

Registered with enhanced security: Registered applications with a security certificate on file can use secure tokens. The Access Request page removes cautions, displaying this message: " Google is not affiliated with <the requesting application>, and we recommend that you grant access only if you trust the site."

セキュリティー強化型で登録済み:
ファイル証明によるWEBアプリケーションの登録が行われている場合にはセキュアトークンが利用可能です。ページ上に注意文は掲載されず、以下のメッセージが表示されます。
「Googleは以下のURLと関連会社の関係にはありません。接続先のWEBサイトが信頼できる場合のみに接続を許可することをお勧めします。」

Registration is optional but recommended.

登録は任意ですがおすすめしています。

For more information on requirements for signing requests, see Signing AuthSub Requests or Signing OAuth Requests.

署名リクエストの詳細要件については「Signing AuthSub Requests(リンク)」か「Signing OAuth Requests(リンク)」を参照してください。

Registered applications are considered "recognized" by Google and this is reflected in the messaging displayed on the Google Access Consent page, which is displayed to users when a third-party application requests access to a Google service and prompts users to grant/deny access for the application.

登録済みアプリケーションは、Googleに「認知」されることになります。ユーザーがサードパーティーのアプリケーションを利用する際に、自分のGoogleアカウントへのアクセス許可/拒否を確認するGoogleの「同意確認のページ」が表示されますが、このページ内に表示される文章に影響を与えることになります。

The messaging differs depending on whether or not the application is registered and signs requests. For unregistered applications, a yellow background is displayed to indicate a caution.

この文章は「登録済みであるかどうか」「証明リクエストであるかどうか」により可変です。登録されていないアプリケーションの場合には、注意喚起のために黄色の背景色が指定されます。

Application domain registration with Google is now automated using a free Google account. If you don't have an account appropriate for registering your application, sign up for one here.

アプリケーションのドメインはGoogleアカウント(無料)にて登録できます。Googleアカウントをお持ちでない場合はこちらから登録(リンク)してください。

To register a new domain:
Go to the Google Manage Your Domains page. Make sure you're using the appropriate Google account. If you're not logged in at all, you'll be prompted to do so. If you start this process and quit without completing, return to the Manage Your Domains page and click on the Manage link for your domain. The site will remember where you left off.

ドメインを登録するには:
「Manage your domains(リンク)」ページへ移動してください。この際、正しいGoogleアカウントを利用中であることを確認するのをお忘れなく。ログインしていないのであればログインするよう促されます。登録途中で完了せずに中断した場合には、「Manage your domains」ページに再度アクセスして、ドメインごとの「Manage」リンクをクリックしてください。サイト側で中断するまでの内容を記憶しておきます。

Note: If you want to be able to use different sub-domains, you'll need to register each sub-domain separately.

注意:複数のサブドメインを利用する場合には、それぞれのサブドメインを登録してください。

1.Add your domain.
Under the heading "Add a New Domain", enter the URL for your domain and click the "Add Domain" button. A new link for the domain is added under the "Manage Registrations" heading. You can register up to eight different domains using one Google account. At this point in the process, your domain has been identified but not yet registered.

1.ドメインを追加します。
「Add a New Domain」というタイトルの下にURLを入力して「Add Domain」ボタンをクリックします。「Manage Registrations」というタイトルの下にリンクがひとつ生成されます。1つのGoogleアカウントに対して8つのドメインまで登録可能。この時点ではドメインは確認されてはいますが、登録はされていない状態です。

2.Verify your domain.
Under the heading "Manage Registrations", click on the link for the domain you just added. The interface walks you through the process of verifying that you have administrator access to the domain. Choose between one of two verification methods: upload an HTML file or add a specific meta tag to your home page.

2.ドメインの照合を行います。
「Manage Registrations」というタイトルの下にある入力したドメインごとのリンクをクリックします。ドメインの管理者であるかを照合する手順が表示されるので、これにに従っていきます。HTMLファイルをアップして照合するか、トップページに特定のmetaタグを埋め込む方法で照合するか、どちらか一方を選択することになります。

Uploading a file: With this method, Google specifies a file name starting with "google". Create an empty file with this name, using the html extension, and upload it to your domain. Be sure to place the file at the domain root. Check that the new file has been published, and return to the Manage Your Domains page for this domain. Click the "Verify" button. If you are unable to verify using this method (for example, there may be a conflict with your web server configuration), use the meta tag method.

ファイルをアップロードする方法:
この方法では、Googleが「google」で始まるファイル名を照合することになります。空ファイルを生成して、html拡張子でこのファイル名を作成し、サーバーにアップロードしてください。必ずドメイン直下にファイルをアップロードします。ファイルが表示できることを確認して「Manage Your Domains」ページに戻ります。「Verify」ボタンをクリックしてみてください。仮にこの方法での照合が難しいようであれば(WEBサーバーの設定と何か競合しているケースなど)、metaタグを利用する方法を試してみてください。

Adding a meta tag: With this method, Google specifies a tag to be added to your domain's home page. Add the tag anywhere in the section of the page and upload it to your domain. Check that the new file has been published, and return to the Manage Your Domains for this domain. Click the "Verify" button.
If verification is successful, you'll be prompted to accept Google's terms of service.

<meta>タグを追加する方法:
この方法ではトップページに特定のmetaタグが埋め込まれているかで照合を行います。ページ内の任意の場所にタグを追加してサーバーにアップします。ファイルの内容が更新されたことを確認して「Manage Your Domains」ページに戻ります。「Verify」ボタンをクリックしてみてください。照合に成功するとGoogleの規約確認が求められます。

3.Provide domain information.
Once you've accepted the terms of service, Google requests two pieces of information to complete registration:

3.ドメインに関連する情報を提供します。
利用規約に同意した後、登録完了のためにGoogleから2つの情報が求められます。

Target URL path prefix:

URLのprefix

This value enables Google to reject all authorization requests ostensibly from your domain that use an incorrect domain or prefix.If you're making an AuthSub request, this URL must be identical to the prefix value of the next parameter used in your authorization requests.

不正なドメインやprefixからの認証リクエストをGoogle側で拒否することができるようになります。AuthSubを利用している場合には、後続の認証リクエストで使用するパラメータの接頭辞とURLのprefixが同一である必要があります。

For example, if your next values will be something like
http://example.com/authsub and/or http://example.com/feed/authsub,
your prefix should be http://example.com.

例えば、後続の値が以下である場合、
http://example.com/authsub and/or http://example.com/feed/authsub,
prefixはhttp://example.comとなります。

If you're using the OAuth interface, this URL must match the value of the oauth_consumer_key parameter.

OAuthを利用している場合には、oauth_consumer_keyのパラメーターと一致している必要があります。

Domain description:
This optional value should briefly describe the domain you're registering. In the future, this description may be displayed on the Google Access Consent page to provide additional information for your users. You always have the option of changing this description or leaving it blank.At this point, you have provided all the information required for registration. Click the "Save" button to complete registration.

ドメインの概要:
ドメインを簡潔に説明するような文章を提供していただきます。将来的には、この文章はGoogleへのアクセス同意のページにユーザーへの追加情報として表示することを予定しています。説明文は常に変更することもできますし、空欄にすることもできます。この時点で登録に関する必要情報をすべて提供していただいたことになります。「保存」ボタンをクリックして登録を完了させてください。

4.Upload a security certificate.

4.セキュリティー証明書のアップロード

If your application is using AuthSub or OAuth with the RSA-SHA1 signature method, you need to upload a security certificate.

RSA-SHA1署名方式によるAuthSubかOAuthを利用してる場合、セキュリティー証明書をアップロードしていただく必要があります。

Note: If you're using OAuth with the HMAC-SHA1 signature method, you do not need to upload a certificate; instead, an OAuth "consumer secret" value is automatically generated when you register your domain.

注意:HMAC-SHA1署名方式のOAuthを利用している場合には、証明書をアップロードしていただく必要はありません。

To create a certificate, generate a public key. The public key must be a 1024-bit RSA key encoded in an X.509 certificate in PEM format. We suggest creating a self-signed certification rather than getting one from a central certificate authority.

証明書を作成するには、公開鍵を生成していただく必要があります。公開鍵は
X.509エンコードされたPEMフォーマットの1024ビットRSA暗号の証明書であることが必要です。

If you have multiple sub-domains registered, you can use the same X.509 certificate for all of them.

複数のサブドメインを登録している場合には、同じX.509証明書を使うことができます。

For more information on creating and using certificates, see these resources:

詳しい証明書の作成と利用に関しては、以下をご参照ください:

Generating X.509 Certificates (from IPsec how-to)(リンク)
X.509 Certificates and Certificate Revocation Lists (from Sun, Java specific but includes good general info) (リンク)

5.Test your registration status.

5.登録状況の確認

Once you've provided the required information and uploaded a security certificate (if desired), use the Manage Your Domains test link to verify that your registration status is accurate. The test link is located on the Manage Your Domains page specific to the domain you're working on.

必要な情報を提供していただき、セキュリティー証明書をアップロード(任意)していただいた後で、登録状況が正常であるかを確認するには「Manage Your Domains」のテストリンクをご利用ください。ドメインごとにテストリンクが「Manage Your Domains」のページに表示されます。

If you've left this site, return to Manage Your Domains and click on the Manage link for the domain you want to test.

Googleのサイトを離れている場合には一度「Manage Your Domains」に戻ってきてからテストしたいドメインの「Manage」リンクをクリックしてください。

The test link essentially makes an AuthSubRequest call using the next URL value you provided for registration. This call prompts a redirect to the Google authorization server's Access Request page. Here you can view what your users are shown when you make an authorization request from your own application.

テストリンクは登録時に提供していただいた後続URLを利用したAuthSubRequestを呼び出すものです。このリクエストによってGoogleの「authorization server's Access Request」ページへリダイレクトします。ここでWEBアプリケーションを実際のユーザーが利用した際に何が表示されているのかを確認していただけます。

Verify that the message provided is appropriate to your registration status.

表示された文言が正しいもであるか検証することにより登録状況を確認することができます。

To update an existing registration:
1.Go to the Google Manage Your Domains page. Make sure you're using the appropriate Google account.
2.Click on the "Manage" link for the domain you want to update.
3.Make your changes and click Save.
4.If desired, test your registration status using the test link.

登録を更新する方法:
1.GoogleのManage Your Domainsページに移動してください。適切なGoogleアカウントでログインしているかどうかの確認をお忘れなく。
2.更新したいドメインの「Manage」リンクをクリックしてください。
3.変更を反映して「保存」をクリックします。
4.テストリンクを利用して登録状況をご確認ください(ご希望の方のみ)。

ads by google

Ads by goolge

Recent Entries

Ads by Rakuten