1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

kintone.proxy を IPアドレス制限の元で利用する際の注意点について

Posted at

kintone.proxy を IPアドレス制限の元で利用する際の注意点についての備忘録です。

概要

cybozu.comにIPアドレス制限を設定した環境で kintone.proxy を利用するには、IPアドレス制限のホワイトリストにcybozu.comで利用するサーバーのIPアドレスを追加します。

kintone.proxy 利用例

例えばアプリ情報の取得APIを利用する場合、アプリのアクセス権限が付与されてない場合はアプリのAPIトークンを取得して、kintone.proxyのヘッダーにAPIトークンを追加してアクセスします。

こんな感じ。

kintone.proxy(kintone.api.url('/k/v1/app', true) + '?id=<アプリID>',
 'GET',
 {"X-Cybozu-API-Token": "<アプリのAPIトークン>"},
 {})

この時に、IPアドレス制限を掛けている場合、cybozu.comが使用するIPアドレスの範囲をCIDR記法で設定します。

スクリーンショット 2021-03-17 11.00.20.png

※cybozu.comが使用するIPアドレスの範囲は変わる可能性があるので、その時の最新の情報を確認のこと。

IPアドレス制限の場合のエラー

「認証が必要です」 というエラーになります。

スクリーンショット 2021-03-17 11.06.25.png

参考

アプリ情報の取得(1件)
https://developer.cybozu.io/hc/ja/articles/202931674#step1

ユーザー認証
https://developer.cybozu.io/hc/ja/articles/201941754#step7

・IPアドレス制限
https://jp.cybozu.help/general/ja/admin/list_security/list_access/ip_restrictions.html

・cybozu.comが使用するIPアドレス
https://jp.cybozu.help/general/ja/admin/list_security/list_access/outbound_ipaddress.html

・What is the IP address for kintone.proxy()
https://developer.kintone.io/hc/en-us/community/posts/115000374368-What-is-the-IP-address-for-kintone-proxy-

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?