flagflag  If you want to see English page, please click "English" Button at Left.
19: 2021-07-11 (日) 00:25:34 iseki ソース 20: 2021-07-13 (火) 12:10:58 iseki ソース
Line 77: Line 77:
 106 c.LDAPAuthenticator.use_ssl = True  106 c.LDAPAuthenticator.use_ssl = True
 107  107
- 108 ## AD: template 付き+ 108 ## AD: template 付き(ユーザバインド)
 109 c.LDAPAuthenticator.lookup_dn = False  109 c.LDAPAuthenticator.lookup_dn = False
 110 c.LDAPAuthenticator.bind_dn_template = [  110 c.LDAPAuthenticator.bind_dn_template = [
Line 94: Line 94:
 123 #c.LDAPAuthenticator.lookup_dn_user_dn_a​ttribute = 'cn'  123 #c.LDAPAuthenticator.lookup_dn_user_dn_a​ttribute = 'cn'
 124  124
- 125 ## NSL: username から dn が探せる場合+ 125 ## NSL: username から dn が探せる場合(ユーザバインド)
 126 #c.LDAPAuthenticator.lookup_dn = False  126 #c.LDAPAuthenticator.lookup_dn = False
 127 #c.LDAPAuthenticator.bind_dn_template = 'cn={username},ou=user,dc=nsl,dc=tuis,dc​=ac,dc=jp'  127 #c.LDAPAuthenticator.bind_dn_template = 'cn={username},ou=user,dc=nsl,dc=tuis,dc​=ac,dc=jp'
Line 106: Line 106:
 135 #c.LDAPAuthenticator.lookup_dn_user_dn_a​ttribute = 'cn'  135 #c.LDAPAuthenticator.lookup_dn_user_dn_a​ttribute = 'cn'
 136  136
 +
 +**** LTI [#m4467ad6]
 +- https://github.com/jupyterhub/ltiauthent​icator
 +
 +- 既にインストールされている ltiauthenticator だと Moodle にログインできない.
 +-- "Moodleと Jupyter Notebookの 連携 によるプログラミング 教育環境 の 構築" 石坂徹,桑田喜隆, et. al., Moodle Moot Japan 2019 Proceedings (2019), pp.32-27
 +--- /usr/local/anaconda/envs/jupyterhub/lib/​python3.8/site-packages/ltiauthenticator​/__init__.py
 + 152            # Before we return lti_user_id, check to see if a canvas_custom_user_id was sent.
 + 153            # If so, this indicates two things:
 + 154            # 1. The request was sent from Canvas, not edX
 + 155            # 2. The request was sent from a Canvas course not running in anonymous mode
 + 156            # If this is the case we want to use the canvas ID to allow grade returns through the Canvas API
 + 157            # If Canvas is running in anonymous mode, we\'ll still want the \'user_id\' (which is the `lti_user_id``)
 + 158
 + 159            canvas_id = handler.get_body_argument(\'custom_canva​s_user_id\', default=None)
 + 160 +          product_code = handler.get_body_argument(\'tool_consume​r_info_product_family_code\', default=None)
 + 161
 + 162            if canvas_id is not None:
 + 163                user_id = handler.get_body_argument(\'custom_canva​s_user_id\')
 + 164 +          elif \'moodle\' in product_code:
 + 165 +                user_id = handler.get_body_argument(\'ext_user_use​rname\')
 + 166            else:
 + 167                user_id = handler.get_body_argument(\'user_id\')
 + 168
 +
 +- jupyterhub_config.py
 + c.JupyterHub.authenticator_class = 'ltiauthenticator.LTIAuthenticator'
 + c.LTIAuthenticator.consumers = {
 +     os.environ['LTI_CLIENT_KEY']: os.environ['LTI_CLIENT_SECRET']
 + }
 +-- キーは二つとも openssl rand -hex 32 で生成.
 +- Moodle 側
 +-- 「サイト管理」=> 「プラグイン」=> 「外部ツール:ツールを管理する」(=>「ツールを手動設定する」)
 +#br
 +
 +- error : module 'oauthlib.oauth1.rfc5849.signature' has no attribute 'signature_base_string' [#l6c7a130]
 +-- conda install oauthlib
 +#br
 +- 欠点:利点?
 +-- %%一度 Moodle 経由でログインすると,ブラウザがアカウントを覚えているらしく,次回からは Moodle 経由で無くともログイン可能.%% ログアウトすればOK
 +-- その他の一般ユーザ認証と併用できない.
 +#br
*** Server Class [#dded2dd0] *** Server Class [#dded2dd0]
Line 140: Line 182:
- DockerSpawner と同じパッケージ? 特にインストールしていないが,既に入っていた. - DockerSpawner と同じパッケージ? 特にインストールしていないが,既に入っていた.
- jovyan ではなく,ログインユーザで使用可.ログインユーザのホームディレクトリをマウントする. - jovyan ではなく,ログインユーザで使用可.ログインユーザのホームディレクトリをマウントする.
-- ただしログインユーザの情報が,ローカルに取れない場合(LDAPのユーザバインドでログインした場合),ホームディレクトリ等の情報が無いので途中でエラーを起こす.+- ただしログインユーザの情報がローカルに取れない場合(LDAPのユーザバインドでログインした場合),ホームディレクトリ等の情報が無いので途中でエラーを起こす.
-- 作りこめば大丈夫かもしれん. -- 作りこめば大丈夫かもしれん.
#br #br


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

81 人のユーザが現在オンラインです。 (22 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 81

もっと...

アクセスカウンタ

今日 : 1308813088130881308813088
昨日 : 7722772277227722
総計 : 2344456923444569234445692344456923444569234445692344456923444569
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com