Book a Demo

Author Topic: Repository.OpenFile2: Problems to connect to cloud repository  (Read 6493 times)

emarinos

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Hello,

We switched to a cloud repository. Now we have problems to connect to this cloud repository through automation with a different user than the logged in windows user. We perform certain operations and adjustments to our model. We are using a "technical" user with special rights to connect to the cloud repository. Our repository supports windows authentication.

Now we encounter the following behavior:

1) Automation is used with a windows user who has an account in the repository:
No EA login screen is displayed, but the windows user is used for connection and NOT the user and password passed to Repository.OpenFile2. The windows user does not have the sufficient rights to perform all necessary operations

2) Automation is used with a windows user who does not have an account in the repository:
The EA login screen is shown, even though the correct user and password is given to Repository.OpenFile2. No way to run unattended.

Is it correct that when connecting to a cloud repository with Repository.openFile2 given username and password are not used. If I connect to server everything works as expected, although after switching to cloud using the server is really slow.

Is there a workaround for this problem? Any help appreciated. Thank you.

Kind regards,
Stati Marinos

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #1 on: April 30, 2018, 08:58:48 am »
Are you getting the http authentication prompt or the security login prompt?

Mauricio Moya (Arquesoft)

  • EA User
  • **
  • Posts: 344
  • Karma: +8/-4
  • EA Consulting and development in Spanish
    • View Profile
    • Arquehub Azure Module
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #2 on: May 01, 2018, 12:04:13 am »
Is your automation running with an .exe file? a .bat file? a windows scheduled task? Please tell us about the environment you created for you automation in order to clarify.

Earnfried

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #3 on: December 02, 2019, 06:31:59 pm »
Hey there,

I am facing the same problem using c# consol script (. exe) which is triggered by Windows task scheduler. Username and encrypted password are saved in a config file. The script is decrypting the password and uses the openFile2() function with connection string to open cloud model. With a local secured model the automation is working, but not with the cloud model.

You mentioned HTTP or security login prompt. How can I identify these? I guess it is the HTTP prompt, because the security credentials worked on a local model.

Best regards


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #4 on: December 03, 2019, 11:49:25 am »
The http(s) security prompt comes directly from Windows. The exact appearance will vary depending on Windows version.

Generally you should see the server name and model name listed. In my test environment it also uses a title of 'Windows Security' and explicitly states that the request is coming from 'EA.exe'.

The EA project security prompt will not provide any of those things. It should have a title 'Login to EA Repository'.

Earnfried

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #5 on: December 11, 2019, 06:26:08 pm »
Hello Eve,

It is a EA security prompt. It has the Titel: "Login to EA Repository"


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #6 on: December 12, 2019, 09:31:24 am »
In that case I'd double check the provided credentials. Can you log in as that user explicitly? May also be worth checking the security settings of the model.

Earnfried

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #7 on: January 13, 2020, 10:16:25 pm »
Hello Eve and happy new year,

I double checked the credentials but it is still not working.
I created a local new created model and added user security and the automation works fine. No dialogs pops up.

When using the same code with the cloud model i have this dialogs:


(When using HTTP Connections string)


(Direct DB Connections string)

So I executed
Code: [Select]
SELECT * FROM t_secpolicies and received for the cloud model:

PropertyValue
UserSecurityEnabled
RequireLock1

I don't have access to the security options for the cloud model. Which options could lead to that problem?
Any ideas?

Best regards

Earnfried

Earnfried

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Repository.OpenFile2: Problems to connect to cloud repository
« Reply #8 on: January 13, 2020, 10:26:57 pm »
I forgot to mention that I also tried the ChangeLoginUser() -function. And I get always the: "Security not enabled" - error message.