Coder Social home page Coder Social logo

freeradius-mobileid's People

Contributors

phaupt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeradius-mobileid's Issues

Provide an optional module to update the ldap entry

Provide a script that will update an LDAP/AD user with the actual SerialNumber of the DN (X-MSS-MobileID-SN)

In addition, adjust the Mobile ID module to allow different options in regards to the SerialNumber check of the Mobile ID user

  1. Ignored
  2. If set it must match
  3. It has allways to present and match
    id module

Reply-Message seems not be returned on freeradius V3

echo "User-Name=+41798440457,User-Password=''" | radclient -t 120 localhost auth testing123
Received response ID 150, code 3, length = 20
exec-mobileid::INFO: MSS_Signature +41798440457 'Demo: Authentication with Mobile ID?' en
exec-mobileid::INFO: FAILED on +41798440457 with error 406 (PB_SIGNATURE_PROCESS: Signature request already in progress.)
exec-mobileid::INFO: RC=2
(1) mobileid : Program returned code (2): Reply-Message:="Error on the user device while confirming the request. Probably an other signature request is already in progress. Please try again." 
(1)   [mobileid] = fail
(1)  } #  post-auth = fail
(1) Using Post-Auth-Type Reject
(1) # Executing group from file /etc/raddb/sites-enabled/mobileid
(1)  Post-Auth-Type REJECT {
(1) attr_filter.access_reject :     expand: "%{User-Name}" -> '+41798440457'
(1) attr_filter.access_reject : Matched entry DEFAULT at line 11
(1)   [attr_filter.access_reject] = updated
(1)  } # Post-Auth-Type REJECT = updated
(1) Finished request 1.
Waking up in 0.9 seconds.
(1) Sending delayed reject

Make sites ready for proxy and realm support

  1. When using realms the Stripped-User-Name should be set as User-Name for further processing.

  2. Move Mobile ID post-auth to authenticate section to support proxy request with other servers and not having additional Mobile ID authentication done

Not working when running as a service

When running freeradius as a service the

TMP=$(mktemp /tmp/_tmp.XXXXXX)           # Request goes here

is not working fine and returning an empty string.

At least on Red Hat Linux

Certificate subject (DN): order of attributes should be independent

Line 245:

UNIQUEIDNEW=$(echo "$RES_CERT_SUBJ" | sed -n -e 's/.*serialNumber=\(.*\),CN=.*/\1/p')

UNIQUEIDNEW=$(echo "$RES_CERT_SUBJ" | sed -n -e 's/.*serialNumber=\(.*\),CN=.*/\1/p')

The regular expression is expecting the 'CN' attribute after the 'serialNumber' attribute. The order of the attributes may change as the order of attributes is not specified.

The regular expression should be improved to be independent of the attribute order.

Update scripts according to the new full certificate chain

  1. In case the full certificate chain is returned in the signature response, the local bag file needs to contain the root certificate only.

  2. Ensure that the bash scripts will pick the correct signer's certificate and not just the 1st one

Bypass the rlm_exec timeout of 30 seconds

freeRadius has taken our patch to avoid hardcoding of the timeout value for an exec process (was 10 seconds). This can now be configured in the corresponding module with the timeout value. The problem is that the maximum is limited to 30 seconds. Better but still not enough to for our MID requests as they are depending on the answer time of the enduser.

Place a change request to freeradius to allow up to 120 seconds

tr raises error about broken pipe

Errors raised during the call of the exec-mobileid.sh

Executing section post-auth from file /etc/freeradius/sites-enabled/mobileid
...
tr: write error: Broken pipe
tr: write error

Add support for telco information (SubscriberInfo)

Return the Telco Information details in a proper attribute.

...
<mss:Status>
          <mss:StatusCode Value="500"/>
          <mss:StatusMessage>SIGNATURE</mss:StatusMessage>
          <mss:StatusDetail>
            <fi:ServiceResponses>
              <fi:ServiceResponse>
                <fi:Description>
                  <mss:mssURI>http://mid.swisscom.ch/as#subscriberInfo</mss:mssURI>
                </fi:Description>
                <ns1:SubscriberInfo xmlns:ns1="http://mid.swisscom.ch/TS102204/as/v1.0">
                  <ns1:Detail id="1901" value="22801"/>
                </ns1:SubscriberInfo>
              </fi:ServiceResponse>
            </fi:ServiceResponses>
          </mss:StatusDetail>
        </mss:Status>
...

Error handling seems not properly done

Verify the returned rlm_exec error codes and messages. Maybe wrong module definitions.

Example

$echo "User-Name=fkaiser,User-Password='fkaiser'" | radclient -t 120 localhost auth
Received response ID 82, code 3, length = 20

Missing the Reply-Message = "The request has been canceled by the user."

Add unique transaction ID in the message

Provide a $TRANS_ID that can be used in the DTBS:

# Message sent to Mobile ID (use $AP_PREFIX to set the customer prefix)
DTBS="$AP_PREFIX: Authentication with Mobile ID?"

to

DTBS="$AP_PREFIX: Authentication with Mobile ID? ($TRANS_ID)"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.