Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New App]: BankID #603

Open
1 task done
jms-du-se opened this issue Dec 15, 2023 · 6 comments
Open
1 task done

[New App]: BankID #603

jms-du-se opened this issue Dec 15, 2023 · 6 comments
Labels
new application A request for adding an application to the projdct

Comments

@jms-du-se
Copy link
Contributor

What is the new application?

BankID is Sweden's most common e-ID.

Version control is done using XML against vks.bankid.com (https://www.bankid.com/en/foretag/enterprise/automatic-version-control)

User-agent needs to be: BankIDSecurityProgram

Installer URL can be found here: https://www.bankid.com/en/foretag/enterprise

Example request:

<?xml version="1.0" encoding="utf-8"?>
<autoUpdateRequest><requestVersion>1.1</requestVersion><requestSequenceNr>1</requestSequenceNr><uhi>g+o9gYX4DcDZkQexT49puYWbWpO4</uhi><version>7.14.102.4</version></autoUpdateRequest>

Example response:

<?xml version="1.0" encoding="UTF-8"?>
<autoUpdateResponse><responseVersion>1.2</responseVersion><responseSequence>2</responseSequence><action>OK</action><bbdt>Njk2MzI0ODgtYWI4NC00ZGEyLWE=</bbdt><value>1705235039</value><time>1702643039</time><nptDelta>1296000</nptDelta></autoUpdateResponse>

I am not sure if the BankID application generates some unique content in the request that is being verified by the version controll server. If that's the case it will probably be difficult to get the latest version.

But I hope this can be done anyway.

Vendor site

https://www.bankid.com

Does the vendor require a sign-in to download the app?

No

Does the application include an updater?

Yes

Have you reviewed the list of supported applications?

@jms-du-se jms-du-se added the new application A request for adding an application to the projdct label Dec 15, 2023
@jms-du-se jms-du-se changed the title Bank ID [New App] Bank ID Dec 15, 2023
@jms-du-se jms-du-se changed the title [New App] Bank ID [New App]: Bank ID Dec 15, 2023
@jms-du-se jms-du-se changed the title [New App]: Bank ID [New App]: BankID Dec 15, 2023
@aaronparker
Copy link
Owner

I'm getting hit with a Captcha response when querying the XML. Highly likely to be because I'm outside Sweden, so creating a function for this could be challenging

@jms-du-se
Copy link
Contributor Author

Hi Aaron, wouldn't that be strange? Swedish citizens should be able to run the version check even when they are abroad.
Did you set the User-Agent to: BankIDSecurityProgram

@aaronparker
Copy link
Owner

aaronparker commented Mar 27, 2024

Got this working with:

$params = @{
    Uri              = "https://vks.bankid.com"
    UserAgent        = "BankIDSecurityProgram"
    ContentType      = "application/xml; charset=utf-8"
    Body             = '<?xml version="1.0" encoding="utf-8"?><autoUpdateRequest><requestVersion>1.1</requestVersion><requestSequenceNr>1</requestSequenceNr><uhi>g+o9gYX4DcDZkQexT49puYWbWpO4</uhi><version>7.14.102.4</version></autoUpdateRequest>'
    #Headers          = @{ "Accept-Language" = "sv-se" }
    #TransferEncoding = "gzip"
    Method           = "POST"
    UseBasicParsing  = $true
    Verbose          = $true
}
iwr @params

which returns:

<?xml version="1.0" encoding="UTF-8"?>
<autoUpdateResponse><responseVersion>1.2</responseVersion><responseSequence>1</responseSequence><nonce>ZGZmMDU2NzMtNzFlYS00YzNkLTg=</nonce><action></action></autoUpdateResponse>

@aaronparker
Copy link
Owner

However, there's not much I can do with the response to turn it into an evergreen download URL. If we were to post the request with version 7.14.102.4 and get back 7.15.102.0, for example, that could be turned into a URL.

@jms-du-se
Copy link
Contributor Author

jms-du-se commented Mar 27, 2024 via email

@aaronparker
Copy link
Owner

The XML in the response data doesn't provide any version data that relates to the download URLs, e.g. https://cdn.bankid.com/bisp/win/BankID_installation_7_14_2.exe, https://cdn.bankid.com/bisp/win/BankID_installation_7_14_2.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new application A request for adding an application to the projdct
Projects
None yet
Development

No branches or pull requests

2 participants