Question

IFS Cloud 22R1 , How to enable Basic Auth for a Standard RestAPI   


Userlevel 5
Badge +9
  • Sidekick (Employee)
  • 50 replies

Hi , I just installed IFS Cloud 22R1 ,

during the installration ,I set

“ifsappproxy.basicAuth = enabled”   in ifscloud-value.yaml.

 

So, my question is, 

what is the next step?

for a specfic Projection(eg: ScrappingCausesHandling.svc) , how to make it support Basic Auth?

 

 

  1. in APPS 10 , via API Explorer , we can set a projection to “Include in Compatibility Application Type ” to make it support basic Auth.   How to do this in IFS Cloud?

      

        2. I alrady read this post , but is doesn’t mention how to enable a specific projection

            

 


11 replies

Userlevel 4
Badge +9

Hi @Shou ,

You don’t have to do anything extra here. “Include in Compatibility Application Type ” is not applicable for IFS Cloud. Therefore you should be able to call the API by setting the required headers for basic auth in the http request. Have you tried calling the API using a tool like Postman?

Also please be mindful that Basic auth. is not recommended in production due to security reasons.

Regards,

/Rifki

Userlevel 4
Badge +11

You had a look at the given details from IFS in the technical documentation?
https://docs.ifs.com/techdocs/22r1/030_administration/030_integration/300_ifs_connect/010_configure_connect/060_transport_connectors/configure_rest_transport_connector/#basic-authentication

Userlevel 5
Badge +9

Thanks.

But the documention is for outbound.   IFS call external system’s rest API.

while, I’m talking about Inbound.

Userlevel 5
Badge +9

Hi @Shou ,

You don’t have to do anything extra here. “Include in Compatibility Application Type ” is not applicable for IFS Cloud. Therefore you should be able to call the API by setting the required headers for basic auth in the http request. Have you tried calling the API using a tool like Postman?

Also please be mindful that Basic auth. is not recommended in production due to security reasons.

Regards,

/Rifki

@Rifki Razick

Yes, I tried, but failed.  (same postman setting works for APPS 10)

 

 

Userlevel 4
Badge +9

@subslk any thoughts?

Userlevel 7
Badge +31

Hi @Shou

during the installration ,I set

“ifsappproxy.basicAuth = enabled”   in ifscloud-value.yaml.

 

Please also double check if you have passed basicAuth parameter to the installer correctly. You can refer to “The parameters order” documentation, which can be found here:

https://docs.ifs.com/techdocs/22r1/070_remote_deploy/010_installing_fresh_system/200_installing_ifs_cloud/035_ifs_cloud_ifsinstaller/030_installation_parameters/#the-parameters-order

You can either pass it using the ifscloud_values.yaml file using the correct YAML syntax as mentioned in above documentation or pass it directly through the command line using a --set flag. 

Parameters for proxy documentation can be found here:

https://docs.ifs.com/techdocs/22r1/070_remote_deploy/010_installing_fresh_system/200_installing_ifs_cloud/035_ifs_cloud_ifsinstaller/030_installation_parameters/#parameters-for-proxy

Hope this helps!

Userlevel 5
Badge +9

@Charith Epitawatta 

I run:

.\installer.cmd --set action=mtinstaller --values ifscloud-values.yaml --values solutionset.yaml 

to install the middle tier

 

and my  ifscloud-values.yaml looks like this:

------------

…….

ifsappiam:
  ifsReadonlySuppUserExpiryEnabled: true
  ifsReadonlySuppUserEnabled: true
  ifsadminTempPasswordEnabled: true

ifsappproxy:
  accessLogEnabled: false
  basicAuth: enabled

  
ifsappodata:
  replicas: 1
  logLevel: error

…..

-------------

 

please tell me if there anything not follow the documentation.

Userlevel 5
Badge +9

@Charith Epitawatta @Rifki Razick @subslk 

I just “delete” the middle tier , then re-installed again

, this time I use “--set” flag to ensure that parameter is passed:

.\installer.cmd --set action=mtinstaller --values ifscloud-values.yaml --values solutionset.yaml --set ifsappproxy.basicAuth=enabled
 

while, still basicAuth is not supported 

I just “describe” the ifsapp-proxy pod, and found  BASIC_AUTHstill disabled.

> kubectl describe pod ifsapp-proxy-xxxxxxxx-8k4ph -n ifscloud

seems it is a bug.

 

Userlevel 5
Badge +9

Hi, it seems the techdoc is faulty. I will correct it. Seems you are the first ever trying to set it :)

Which is good as we don’t encourage setting the entire application with basic Auth enabled… i would suggest to adopt the inbound integration to use a proper oAuth token instead…  

If you still really need basic Auth:
The parameter is called basicAuthEnabled and not basicAuth and should be set to true or false

 

Userlevel 5
Badge +9

Doc updated on all tracks now - e.g.:
http://techdocs/22r1/070_remote_deploy/010_installing_fresh_system/200_installing_ifs_cloud/035_ifs_cloud_ifsinstaller/030_installation_parameters/#parameters-for-proxy

Userlevel 5
Badge +9

@hhanse @Charith Epitawatta @Rifki Razick @subslk 

I just re-create the server with 

basicAuthEnabled: true

this time , as I describe the pod , it do enable the Basic Auth:

 

while, Postman show me another error with a simple GET

you can test with our Internal Server

https://dlk1k8s505.corpnet.ifsworld.com/

ifsadmin/Inter***123

Reply