CKAN with data access only after login

 ̄綄美尐妖づ 提交于 2019-12-01 14:46:21

CKAN has its own authentication system, but we have developed a extension that allows developers to use some IdM (including the FIWARE one) to authenticate the users. If you want to use this extension you can check the instructions for installing it on https://github.com/conwetlab/ckanext-oauth2

We have also developed another extension to manage the users that can view a specific dataset. However, I think this extension does not fit to your purposes, but you can develop your own extension (as stated by Kapucko). It's very easy, you have to follow the instructions provided on http://docs.ckan.org/en/latest/extensions/tutorial.html.

In your case you will have to implement the IAuthFunctions plugin interface, overwrite the package_show function and return { 'success': True } only when the user is logged in. I seem to remember that this only happens when context.get('auth_user_obj') is not None.

You can also use organizations and create all the datasets within it (setting the Visibility field to Private). Nevertheless, I do not recommend you this approach since you will have to manually insert new users.

You can write custom extensions for CKAN, where you can define your custom authentication. A good point where to start is: https://ckan.readthedocs.org/en/latest/maintaining/authorization.html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!