Enterprise Authorization

Updated: 2022-12-7

To enable authorization for enterprise applications, you can call the following APIs: Departments and Members Operations, Library Operations, and Single Sign-On.

Required: Enable Development Authorization Feature

  • Log in to the Enterprise Management Console:
https://passport.fileshow.com/login#ent
  • Add authorization in the Development Authorization section:

Authorization Management

Authorization Scope

You can set the authorization scope for enabled enterprise authorizations.

Built-in Authorization Actions

Departments and Members Operations

Library Operations

Single Sign-On (SSO)

  • SSO - Login to Web Version, Action: sso-login, allows logging in to the web version without the format parameter
  • SSO - Get Token, Action: sso-token, allows obtaining gkkey (used to get the user token), with format parameter set to json

IP Restrictions

You can restrict the IP addresses allowed to call the interfaces. This can be specified as individual IP addresses or CIDR notation, separated by newlines.

10.11.213.145
10.11.0.0/16

Custom Configuration

{
  "Version": "2016-09-23",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "openapi:1:org:ls",
      "Resource": "*",
      "Condition": {
        "IpAddress": [
          "10.11.213.145",
          "10.11.0.0/16"
        ]
      }
    }
  ]
}

Configuration Explanation:

Configuration Item Type Description
Version String Fixed value 2016-09-23
Statement Array Defines multiple policies
Effect String Effect, Allow to permit, Deny to refuse; when actions conflict, denial takes precedence
Action String or Array Action to be taken, defined combinations, e.g., query library list openapi:1:org:ls, where openapi denotes enterprise open API, 1 is the API version, org represents Library Operations, and ls is the Get Library List interface; built-in Actions can also be used, like org-common-query
Resource String or Array The resource being operated on, * denotes all resources, with future support for more granular resource configurations
IpAddress String or Array IP restrictions for calling the interface; if not set, all IP addresses are allowed to call the interface