Application Settings
  • 05 Sep 2024
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Application Settings

  • Dark
    Light
  • PDF

Article summary

The Application Setting

The safran API has a few application settings available, allowing some input on how the API should operate.

Earlier version

In case you have version 7.3 or earlier version of the API please refer to this Installation.7.3 and earlier version. In case you are installing a newer version, then this page is for you.


appSettings


The application settings are found the the file appsetting.json.

SafranWebApiAuthenticationType

  • This allows specifying which authentication types to use.
  • Valid values:
    • None
    • Basic
    • Kerberos
    • JsonWebToken
  • This is related to the "Security" part of the API.

SafranWebAPIUsers

  • This allows specifying the user to be verified in the Active Directory when using the "Kerberos Authentication."
  • This is also related to the "Security" part of the API.

SafranWebAPIOwnerVerificationDuringApiCalls

  • Allows for an added level of validation before updating or retrieving data from the API.
  • Valid values for the setting are "true" and "false".
  • If the setting is "true", most API calls require an additional parameter to be provided. The parameter is "owner" and takes a string. The API will then verify the provided Owner is the actual owner of the Project details. If that is the case, the details are provided; otherwise, the call will be rejected with code 401 - Unauthorized. The owner is a Safran User.
  • If the setting is "false", no validation is performed by the API.

/v1/activities?owner=safransa&network_id=1

Tracing

  • Allows for tracing and logging of the system execution. Please see the separate chapter, "Tracing", for more details.

<appSettings>
  ...
"AppSettings": {
  "_comment_SafranWebApiUsers": "domain\\ADgroup or just ADgroup (then users current domain is assumed",
  "SafranWebApiUsers": "SafranWebApiUsers",

  "_comment_SafranWebApiAuthenticationType": "Use 'None' for no authentication, 'Basic' for basic database 'user' table authentication, 'Kerberos' for Kerberos Windows Active Directory authentication, or 'JsonWebToken' for OAuth Json token,"
  "SafranWebApiAuthenticationType": "none",

  "_comment_SafranWebAPIOwnerVerificationDuringApiCalls": "Use True to verify that given owner in a API call matches the owner of the network. User False to not use this functionality",
  "SafranWebAPIOwnerVerificationDuringApiCalls": "false",
  
  "jsonwebtoken": {
    "key": "ThisismySecretKey2749C6AE486C6E783BBADF7F8BADF",
    "issuer": "Safran",
    "audienceclaim": "e8a494f5-f180-dead-beef-762a85ce7d0f"
    }
},


Very long URL Support

Query String Length (maxQueryStringLength):
In ASP.NET Core, there is no direct configuration for limiting the query string length within the application itself. Instead, this setting is typically managed at the reverse proxy level (such as IIS or NGINX) or directly in the web server configuration.

maxQueryString

Same as above.

Assembly Binding

If you previously had assembly binding redirects for Newtonsoft.Json in your “web.config”, you could safely remove them when migrating to .NET Core. .NET Core handles assembly resolution differently and doesn’t rely on the same binding redirects.



Was this article helpful?