Cannot access custom properties in post auth script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thund
    Junior Member
    • Nov 2024
    • 2

    Cannot access custom properties in post auth script

    Dear all,

    I created a post auth script to check the expiration time of the VPN account before allow user connect. I can see the custom expiration_date property when query user properties:
    Code:
    sacli --pfilt demo UserPropGet
    {
      "demo": {
        "conn_group": "IT",
        "conn_ip": "10.10.92.2",
        "expiration_date": "Monday, October 7, 2024 10:10 AM",
        "last_login": "Monday, November 11, 2024 11:11 AM",
        "prop_superuser": "true",
        "type": "user_compile"
      }
    }
    but in the post_auth function, I didn't see it on the proplist of the authret argument:
    Code:
    {'status': 0, 'nameid': 'demo', 'user': 'demo', 'auth method': 'saml', 'proplist': {'prop_autogenerate': 'true', 'prop_force_lzo': 'false', 'prop_superuser': 'true', 'prop_autologin': 'false', 'prop_deny': 'false', 'user_auth_type': 'saml', 'conn_group': 'IT', 'type': 'user_compile', 'conn_ip': '10.10.92.2'}}
    Are there anyone got this problem?

    Access Server: 2.14.1
    OS: Ubuntu
  • thund
    Junior Member
    • Nov 2024
    • 2

    #2
    I debug and detect that the custom property should using the "pvt_xxxxx" syntax.

    Comment

    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎