Giter VIP home page Giter VIP logo

aps2-addon's Introduction

Code Climate Issue Count

SpamExperts

SpamExperts application for CloudBlue Commerce (20.4 and 20.5), built using the APS framework.

Build (OSX/Linux)

After cloning a local copy, simply run:

php build.php

And you'll get a build ready for packaging in 'spamexperts'. To get the ready-to-deploy package as well, simply add '--package':

php build.php --package

Note: If you want to use --package, you will need to install the APS PHP Runtime Library and the APS Command Line Tools.

Build Options

Here is a more detailed explanation of the options you can use for the build:

--src     => Source directory to use for the build (default is 'src'); Usage: --src my_source_dir
--dir     => Use a specific output directory name (default is 'spamexperts') Usage: --dir my_output_dir
--package => Build an APS package; you can optionally specify a name (default is 'SpamExperts-2.0-X.app.zip') Usage: --package; --package='my_package.app.zip'
--dev     => Development build (keeps some files; ignores --package) Usage: --dev

aps2-addon's People

Contributors

alexkiro avatar dbistriceanu avatar djordje-adzemovic-devtech avatar dmitry-lomakin avatar donici avatar ili101 avatar kesarion avatar laurentiuteodorescu avatar tonyandrewmeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aps2-addon's Issues

APS protecting all mailboxes despite only one selected

Version information

APS 2.0-15
Operations Automation 7.0

Steps to replicate

  1. In the APS package go to the Email Users tab
  2. Apply a filter on a domain, to only list mailboxes related to that domain
  3. Select the resulting mailboxes and click "Protect"

Actual result

The protect operation runs for all mailboxes related to the subscription, instead of the selected ones.

Expected result

You'd expect the Protect action to only trigger for the selected email users.

Other notes

Support: #526066

screenshot

PHPUnit package should not be deployed

Version information

2.0.21

Steps to replicate

  1. Install the latest package on a testing APS sandbox

Actual result

Please note that the support for PHPUnit 4 by the PHPUnit Project ended on February 3, 2017. Also note that PHP 5.3, PHP 5.4, and PHP 5.5 are no longer supported by the PHP Project.

Expected result

PHPUnit package should not be deployed

Other notes

Some protected users not showing Protected in Odin

Version information

APS 2.0-15

Steps to replicate

  1. Try to protect an email user from Odin

Actual result

  1. User remains displayed as "Unprotected"

Expected result

  1. User should show as protected

Other notes

Odin indicates this issue occurs because their API call only returns maximum 1.000 results:

As per our previous update the issue is related to the APS application as it uses URL such as '/aps/2/resources/edaa6f38-ecd9-4be5-9964-10370f2a13e4/emails' which will not list more than 1000 emails.

Likely therefore we are unable to verify the email user correctly?

ST: #970987

Domain not showing as protected in APS

Version information

ASP 2.0-17

Steps to replicate

1.Add a domain
2.Try to protect the domain
3.Domain doesn't show protected, but is added to the Control Panel

Actual result

Domain doesn't show protected

Expected result

Domain should show protected

Other notes

WHMCS: #363669

APS2.0 addon fails to add the correct destination when protecting domains

Version information

7.4 platform
APS 2.0-21

Steps to replicate

  1. install addon on 7.4 platform
  2. create a ST and SP
  3. order it
    4, add a domain
  4. Use the protect option

Actual result

Fails to add the correct destination + mx records are not correctly set

Expected result

Domain should be added with the correct destination

Other notes

CodeBlue investigated this and found the issue with the variable $SEMXs in context.php within the replaceMXRecords method is not filled with the mx records being set in the APS's configuration screen (mx1 to mx4) .. these come from $this->mx, but that property is empty and I can't find a place where it's being properly set when the APS wants to set MX records. There's one place, but that method getServiceMXRecords isn't even properly working.

ticket: 998170

Missing German Translation

Hello,

spam experts aps package is not supporting multi language. So if customer login to odin service automation in german language, then text should be shown in german.
If customer login in english language, text should be shown in english.

Add Custom MX records template support when using external nameservers

Version information

APS 2.0-15

Steps to replicate

  1. Provision SpamExperts combined with an Odin mail service (such as Microsoft Exchange) for a domain which is configured to use an external DNS server

Actual result

The domain is provisioned with the route set to the MX records as returned by the external DNS server.

Expected result

The domain is expected to be provisioned with the route set to the custom MX records template corresponding with the included mail service.

unbenannt2
unbenannt 5

Add categorization to domains shown in the domains list

A client mentioned that it's not helpful for them that they can see all the domains in the domain list and that there is no separation between hosting plans or protected domains. It would be helpful if there was an option to filter or show specific results.

Tracking ID: #437018

SPF Record not updated

Hello,

in case domain is getting protected by spamexperts. MX record is changed.
But SPF record is not changed as well.

So customer running into problem that outgoing mails are not accepted, because SPF record is not including spamexpert servers.

Auto-provision does not work for a most first domain in the subscription

When an instance of the application is set up, a service plan based on the right service template is created and a newly created customer tries to order a service based on the service plan which should provide autoprovision nothing happens - the newly added domain (the first one in the new subscription) are shown in the list as unprotected and there is no any attempt to notify the app about that new domain creation registered in the endpoint logs.

If another domain is added into the subscription from the top above it gets auto protected without any problem, as it should.

Show actual error message when email user protection fails

If someone tries to Protect some email with unprotected domain from panel UI nothings happens.
Please check following GIF https://www.dropbox.com/s/ngcj1rhpcx62yte/EmailProtectTry.gif?dl=0

On backend the corresponding requests can be seen but UI does not display any information and it confuses.

[2017-06-01 06:24:14] Context.INFO: updateResources: start [] []
[2017-06-01 06:24:14] Context.INFO: updateResources: Starting update process for resource ([email protected]) [] []
[2017-06-01 06:24:14] Context.WARNING: [REPORT]: SE email resource '[email protected]' not found. Use the 'Protect' action to have it created and protected. [] []
[2017-06-01 06:24:14] Context.INFO: updateResources: stop [] []
[2017-06-01 06:24:17] Context.INFO: updateResources: start [] []
[2017-06-01 06:24:17] Context.INFO: updateResources: Starting update process for resource ([email protected]) [] []
[2017-06-01 06:24:17] Context.INFO: updateResources: Protecting resource [] []
[2017-06-01 06:24:17] Context.INFO: protectResource: start [] []
[2017-06-01 06:24:17] Context.INFO: protectResource: Protection process starting [] []
[2017-06-01 06:24:17] Context.WARNING: [REPORT]: Domain not protected. (gmail.com) [] []
[2017-06-01 06:24:17] Context.WARNING: [REPORT]: Domain 'gmail.com' not protected, please make sure it is in order to add this email. ([email protected]). [] []
[2017-06-01 06:24:17] Context.INFO: protectResource: stop [] []
[2017-06-01 06:24:17] Context.INFO: updateResources: stop [] []

This behavior needs to be improved so the actual problem would be visible to end-users so they could have a chance to fix it.

"Could not replace MX records for domain" error

Version information

2.0-20

Steps to replicate

  1. Try to protect a certain domain
  2. Observe the error in logs and the domain is not protected

Actual result

The domain is not protected and there are errors in logs.

Expected result

The domain is protected and no errors.

Other notes

Debug logs:

[root@endpoint ~]# tail -fn0 /var/www/html/spamexperts/logs/app-log-2018-07-24
...
[2018-07-24 19:33:15] Context.INFO: replaceMXRecords: Setting up record: ****. -> ****. [] []
[2018-07-24 19:33:15] Context.INFO: replaceMXRecords: Linking new record to domain records collection [] []
[2018-07-24 19:33:16] Context.WARNING: [REPORT]: Could not replace MX records for domain '*******'. [exception 'Rest\RestException' with message 'Can not create DNS Record for '__host__'. There is an existing __rr_type__ record (__host__ __data__, #__rr_id__) already.' in /usr/share/aps/php/aps/2/apsc.php:383 Stack trace: #0 /usr/share/aps/php/aps/2/apsc.php(989): APS\Proto->sendRequest('POST', 'aps/7.2/resourc...', '{\n "aps": {\n...') #1 /var/www/html/spamexperts/context.php(1106): APS\ControllerProxy->linkResource(Object(com\parallels\aps\types\pa\dns\zone\v1\v1\PAHostedDomain), 'records', Object(com\parallels\aps\types\pa\dns\record\mx\v1\v0\PADnsMXRecord)) #2 /var/www/html/spamexperts/context.php(821): context->replaceMXRecords(Object(com\parallels\aps\types\pa\dns\zone\v1\v1\PAHostedDomain)) #3 /var/www/html/spamexperts/context.php(758): context->protectResource(Object(com\parallels\aps\types\pa\dns\zone\v1\v1\PAHostedDomain)) #4 /var/www/html/spamexperts/context.php(577): context->updateResources(Array, true) #5 [internal function]: context->domainProtect('["0b4c7084-8cad...') #6 /usr/share/aps/php/aps/2/rest.php(1093): call_user_func_array(Array, Array) #7 /usr/share/aps/php/aps/2/runtime.php(402): Rest\RestService->handle() #8 /usr/share/aps/php/aps/2/runtime.php(460): APS\Loader->handleHttpRequest() #9 /usr/share/aps/php/aps/2/runtime.php(472): APS\Loader->process() #10 [internal function]: APS\Loader->__destruct() #11 {main}] [] []
...
[2018-07-24 19:33:16] Context.WARNING: [REPORT]: Failed to replace domain MX records. This is an issue with POA/APS, please contact support for further information. (****) [] []
...
[2018-07-24 19:33:16] Context.WARNING: [REPORT]: Domain MX records aren't set correctly. The 'Protect' action may fix this for you, otherwise please contact your service provider. (****) [] []
...

API response:

# curl -k -E /usr/local/pem/APS/certificates/poa.pem 'https://localhost:6308/aps/2/resources/0b4c7084-8cad-4b68-98f3-23cd11a4e289/records?and(implementing(http://parallels.com/aps/types/pa/dns/record/mx/1.0),out(exchange,(****.,****.)),sort(+priority))'
[
  {
    "aps": {
      "type": "http://parallels.com/aps/types/pa/dns/record/mx/1.0",
      "id": "b75ff167-dd8e-4612-a1ee-0d5fa9ba9965",
      "status": "aps:ready",
      "revision": 2,
      "modified": "2017-01-09T13:32:06Z"
    },
    "RRState": "active",
    "TTL": 3600,
    "exchange": "****",
    "priority": 10,
    "recordId": 50079,
    "source": "",
    "sourceFQN": "****.",
    "data": "10 ****."
  },
  {
    "aps": {
      "type": "http://parallels.com/aps/types/pa/dns/record/mx/1.0",
      "id": "4afc30a3-f4f7-463a-9f32-4b866d3ec68d",
      "status": "aps:ready",
      "revision": 3,
      "modified": "2017-01-09T13:32:56Z",
      "subscription": "ec766935-91ca-44ff-bf5e-2f805606ecaf"
    },
    "RRState": "active",
    "TTL": 3600,
    "exchange": "****",
    "source": "",
    "priority": 20,
    "recordId": 50080,
    "sourceFQN": "****.",
    "data": "20 ****."
  },
  {
    "aps": {
      "type": "http://parallels.com/aps/types/pa/dns/record/mx/1.0",
      "id": "4b8800d3-eab7-4889-a9c5-e314e67222af",
      "status": "aps:ready",
      "revision": 2,
      "modified": "2017-01-09T13:32:15Z"
    },
    "RRState": "active",
    "TTL": 3600,
    "exchange": "****",
    "priority": 20,
    "recordId": 50080,
    "source": "",
    "sourceFQN": "****.",
    "data": "20 ****."
  }
]

Warnings "aps215: in the APP-META.xml

Version information

2.0-18

Steps to replicate

  1. Run the APS lint utility

Actual result

APP-META.xml:116: Warning aps215: Navigation element id 'suwizard.new' does not
match regular expression '^[a-zA-Z_\-][a-zA-Z_0-9\-]*$'.
APP-META.xml:120: Warning aps215: Navigation element id 'suwizard.overview' does
 not match regular expression '^[a-zA-Z_\-][a-zA-Z_0-9\-]*$'.
APP-META.xml:123: Warning aps215: Navigation element id 'suservice.view' does no
t match regular expression '^[a-zA-Z_\-][a-zA-Z_0-9\-]*$'.

Expected result

No warnings.

Add support for archive diskspace usage tracking and quotas

We currently have a place-holders for several archiving features:

archiving_space - will count archiving disk space in mb
archiving_quota_soft - here you can set the soft quota in mb
archiving_quota_hard - here you can set the hard  quota in mb
archiving_accounts - will count archiving accounts

We should support these with the newly available API calls:

/api/domain/getstorage/domain/<string>/
/api/domain/setsoftquota/domain/<string>/quota/<int or string>/
/api/domain/sethardquota/domain/<string>/quota/<int or string>/

Unsure if there is a match for archiving_accounts already.

Client 1 CR:3
Client 2 CR:1

Moving a subscription with SpamExperts resources from one customer to another

We can not move subscriptions from one customer to another customer within Odin CP and according to Odin support this is due to SpamExperts resource. Response from Odin Support

Hello,

I checked this case using the previously provided KB article https://kb.odin.com/en/127356.

Here is the result of a query from the article, which was executed during pem.checkMoveSubscriptions API call:

sc_id

55
62
28
52

Here are the mappings of the obtained service controllers IDs:

sc_instance_id | sc_id | location_id | component_id | pid
----------------+-------+--------------------------------------------------------------------+--------------+-------
55 | 55 | Exchange:/usr/local/pem/libexec/Exchange.so.7.2.0.23 | 143 | 14124
62 | 62 | IIS:/usr/local/pem/libexec/IIS.so.7.2.0.29 | 175 | 14171
28 | 28 | SaaS:/usr/local/pem/libexec/SaaS.so.7.2.0.489 | 74 | 13093
52 | 52 | ActiveDirectory:/usr/local/pem/libexec/ActiveDirectory.so.7.2.0.16 | 140 | 14054

Exchange, IIS and Active Directory all provide movable resources. SaaS points to some APS application. This is our primary suspect. Here are mappings of the service controller #28 to resources of the subscription in question:

class_name | sc_id | rt_id
-----------------------+-------+---------
rc.saas.resource.unit | 28 | 1002085
rc.saas.resource.unit | 28 | 1002088
rc.saas.resource.unit | 28 | 1002091
rc.saas.resource.unit | 28 | 1002094
rc.saas.resource.unit | 28 | 1002099
rc.saas.resource.unit | 28 | 1002102
rc.saas.resource.unit | 28 | 1002105
rc.saas.resource.unit | 28 | 1002108
rc.saas.resource.unit | 28 | 1002111
rc.saas.resource.unit | 28 | 1002132
rc.saas.service | 28 | 1002076
rc.saas.service | 28 | 1002079
rc.saas.service | 28 | 1002082
rc.saas.service.link | 28 | 1002073

All of these resources belong to SpamExperts APS application. This application does not implement the 'Migratable' type. This can be easily checked in schema files available in 'schemas' subfolder of the APS package.

[root@osscore schemas]# pwd
/usr/local/pem/APS/packages/bbff3769-85cd-4b2d-b767-3dd4aca2ea08/schemas
[root@osscore schemas]# grep -i migrat *

Thus SpamExperts APS application resources are preventing the subscription to be migrated to another account. More on the subject is available here:

https://doc.apsstandard.org/7.0/backend/types/core/migratable/

In order to resolve this issue please contact SpamExperts APS packager with the request to allow the application to transfer its subscriptions. According to APP-META.XML:

SpamExperts B.V. http://www.spamexperts.com http://www.spamexperts.com

Please can you look into this and working on allowing us to move subscriptions

Local Recipients not removed

Version information

2.0-17

Steps to replicate

  1. Try to unprotect Local Recipients
  2. The task is successful

Actual result

The recipient is not removed

Expected result

The recipient should be removed

Other notes

2018-04-13 05:44:40] Email.INFO: unprovision: Removing SE email user resource [] []
[2018-04-13 05:44:40] API_Client.DEBUG: removeEmailUser: Email user removal request [] []
[2018-04-13 05:44:41] API_Client.DEBUG: >>>>>>>> GET /api/emailusers/remove/username/[email protected] HTTP/1.1 Host: my.nospamcloud.com User-Agent: ProSpamFilter/2.0-17 Authorization: Basic dHQteXNhdG8wMV8xMDM4Mzg5OmY4MmUwM2FjZjhjZDkxMGFhYWJhODk4MDI0MGJjNTVj <<<<<<<< HTTP/1.1 200 OK Server: nginx Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-cache Pragma: no-cache Set-Cookie: SESESSID=muoln649086rmuch07cj6c84r1; expires=Fri, 13-Apr-2018 06:44:40 GMT; Max-Age=3600; path=/; HttpOnly, returnToDomain=; expires=Thursday, 12-Apr-2018 14:44:40 JST Date: Fri, 13 Apr 2018 05:44:41 GMT SUCCESS: Delivery Email Scout Reports where removed for this user SUCCESS: Submission Email Scout Reports where removed for this user SUCCESS: Successfully deleted -------- {"request":"[object] (Guzzle\Http\Message\Request: {})","response":"[object] (Guzzle\Http\Message\Response: {})","handle":"[object] (Guzzle\Http\Curl\CurlHandle: {})"} []
[2018-04-13 05:44:41] API_Client.DEBUG: removeEmailUser: Result: true Response: 'SUCCESS: Delivery Email Scout Reports where removed for this user SUCCESS: Submission Email Scout Reports where removed for this user SUCCESS: Successfully deleted ' [] []
[2018-04-13 05:44:41] Email.INFO: unprovision: stop [] []
[2018-04-13 05:44:41] Context.INFO: unprotectResources: stop [] []

WHMCS

Provisioning error

One of or clients is trying to set up APS 2.0 by provisioning a subscription plan order for a reseller, but they are getting the following error:

The order provisioning has failed.

The last error - "Service Creation Failed: Operation Automation service was not created. Task "Provisioning "context" for APS application SpamExperts" (id = 15945252) is failed with error: "APS Application Error:
500 Internal Server Error
[Exception] Provisioning: resource 674d05e8-28c7-4c8f-925d-8e14196c7450 of type 'context' (http://aps.spamexperts.com/app/context/2.0) for APS application 'SpamExperts-2.0-15': Internal Server Error: ERROR: Couldn't create a SpamExperts account for the new subscription. More details can be found in the logs (if advanced logging has been enabled)..
Body: {
"code": 500,
"error": "Exception",
"message": "Internal Server Error: ERROR: Couldn't create a SpamExperts account for the new subscription. More details can be found in the logs (if advanced logging has been enabled).",
"http_request": "POST /spamexperts/context to 'provisioning02.example.com'"
}
". Service Creation Failed: Operation Automation service was not created. Task "Provisioning "context" for APS application SpamExperts" (id = 15945252) is failed with error: "APS Application Error:
500 Internal Server Error
[Exception] Provisioning: resource 674d05e8-28c7-4c8f-925d-8e14196c7450 of type 'context' (http://aps.spamexperts.com/app/context/2.0) for APS application 'SpamExperts-2.0-15': Internal Server Error: ERROR: Couldn't create a SpamExperts account for the new subscription. More details can be found in the logs (if advanced logging has been enabled)..

Body: {
"code": 500,
"error": "Exception",
"message": "Internal Server Error: ERROR: Couldn't create a SpamExperts account for the new subscription. More details can be found in the logs (if advanced logging has been enabled).",
"http
```_request": "POST /spamexperts/context to 'provisioning02.example.com'"
}
".".
Please check the "Provisioning item" (details) and the last items of the "Service Status History" (details) of the associated subscriptions for more details. As soon as you fix the problem, resubmit this order for provisioning.
Additional information about this error in Odin Knowledge Base - Click here to find a solution

Errorlog :

provisioning02.example.com:/var/www/html/spamexperts # less logs/app-log-2017-02-02
[2017-02-02 11:35:24] Service.INFO: provision: start [] []
[2017-02-02 11:35:24] Service.INFO: provision: stop [] []
[2017-02-02 14:32:35] Context.INFO: provision: start [] []
[2017-02-02 14:32:35] Context.INFO: provision: Provisioning context [] []
[2017-02-02 14:32:36] Context.INFO: provision: Creating new SE account [] []
[2017-02-02 14:32:36] Context.INFO: createReseller: start [] []
[2017-02-02 14:32:36] Context.INFO: createReseller: Creating SE account [] []
[2017-02-02 14:32:37] Context.INFO: createReseller: stop [] []
[2017-02-02 14:32:37] Context.ERROR: provision: Couldn't create SE account! [] []
logs/app-log-2017-02-02 (END)

Logs:

provisioning02.example.com:/var/www/html/spamexperts/logs # less app-log-2017-02-03
[2017-02-03 07:50:55] Context.INFO: provision: start [] []
[2017-02-03 07:50:55] Context.INFO: provision: Provisioning context [] []
[2017-02-03 07:50:56] Context.INFO: provision: Creating new SE account [] []
[2017-02-03 07:50:56] Context.INFO: createReseller: start [] []
[2017-02-03 07:50:56] Context.INFO: createReseller: Creating SE account [] []
[2017-02-03 07:50:56] API_Client.DEBUG: addReseller: Add reseller request [] []
[2017-02-03 07:50:57] API_Client.DEBUG: >>>>>>>> GET /api/reseller/add/username/simplyit36_1009580/password/  /email/[email protected]/domainslimit/0/api_usage/1 HTTP/1.1 Host: login.example.com User-Agent: ProSpamFilter/2.0-15 Authorization: Basic <<<<<<<< HTTP/1.1 200 OK Server: nginx/1.10.2 Content-Type: text/html; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, no-cache Pragma: no-cache Set-Cookie: SESESSID=xxxxxxl16; expires=Fri, 03-Feb-2017 08:50:56 GMT; Max-Age=3600; path=/; HttpOnly, returnToDomain=; expires=Thursday, 02-Feb-2017 08:50:56 CET Date: Fri, 03 Feb 2017 07:50:57 GMT ERROR: The domains limit value cannot be 0. ERROR: User ID is invalid -------- {"request":"[object] (Guzzle\\Http\\Message\\Request: {})","response":"[object] (Guzzle\\Http\\Message\\Response: {})","handle":"[object] (Guzzle\\Http\\Curl\\CurlHandle: {})"} []
[2017-02-03 07:50:57] API_Client.DEBUG: addReseller: Result: false Response: 'ERROR: The domains limit value cannot be 0. ERROR: User ID is invalid ' [] []
[2017-02-03 07:50:57] Context.INFO: createReseller: stop [] []
[2017-02-03 07:50:57] Context.ERROR: provision: Couldn't create SE account! [] [] 


ID #321118

Archiving not activated when Application Counter is increased as part of upgrade

Customer purchase subscription with spamexperts enabled but without archiving enabled.
Later he activate archiving option, it is not getting enabled on spamexpert appliance.

If customer choose archiving during purchase of the subscription, then it is getting enabled.

Version information

APS 2.0-15

Steps to replicate

  1. Provision SpamExperts with the archiving 'Application Counter (unit)' set to 0
  2. The archiving product is (correctly) disabled
  3. The customer upgrades their service changing the archiving 'Application Counter' set to 1
  4. This action is not provisioned, archiving remains disabled in SpamExperts

Actual result

Archiving product is not enabled when the archiving 'Application Counter (unit)' is changed from 0 to 1 after provisioning.

Expected result

Archiving product should be enabled when the archiving 'Application Counter (unit)' is changed from 0 to 1 after provisioning.

Other notes

Information requested from Odin: [APS #2076135]

Application sets incorrect usage values in OSA every night

Version information

OSA Version 7.3
SE APS 2.0 application v2.0-19

Steps to replicate

A client informed us that the APS package is no longer working with latest OSA Version 7.3. The APS package has a bug that sets incorrect values in OSA every night which makes SpamExperts unusable.

Actual result

All usages (incoming/outgoing/archiving) are reported as zeros.

Expected result

Real usages to be reported.

Error when loggin in via APS

Version information

APS version 2.0-17.

Steps to replicate

1.Client logs in via APS
2. He gets an error after logging in
3. He cannot login again via aps

Actual result

The domain is not shown as protected and the user cannot login anymore

Expected result

The user should be able to login and the domain status should show as protected

Other notes

Attached screenshots, without the 3rd one as it contains logs.
WHMCS: #609912
sec1
sec2
sec4

Protection status can be shown incorrectly for users with multiple subscriptions

It can be the case when a customer with 2 or more subscriptions protects their domains using different subscription and then switches active subscription the domains which have not been protected under active subscription re shown as unprotected, while they actually are protected.

This happens because for each subscription a new sub-admin in SpamExperts control panel is created and these new accounts' credentials are used for protection. And due to security reason accounts at the same level cannot retrieve information about other accounts' domains. That's why one subscription cannot pull information about domains of another accounts.

The solution here can be to just hide the domains in the SpamExperts application which don't belong to active subscription - it would make the whole behavior cleaner for end-users.

APS2 wrongly protecting domains based on account instead of subscription level

Version information

APS 2.0-15

Steps to replicate

When provisioning SpamExperts together with e.g. Hosted Exchange plan, the autoprotection apparently is enabling protection on wrong domains which do not have mailhosting configured in the subscription.

For example:
example1.ext has email hosting enabled for subscription 12345 Hosted Exchange
example2.ext has email hosting enabled for subscription 22222 webhosting

example2.ext is automatically protected by SpamExperts, however SpamExperts is only included in the Hosted Exchange plan.

Actual result

All domains which are in the account are autoprotected.

Expected result

Only domains that have the SpamExperts subscription should be protected.

Other notes

Odin reviewed this case.

1. Whenever one try to access the panel in APS, this screen is built by APS itself which for your information retrieve all details needed for the screen via RQL to OA APS resources.

2. As for the reported SpamExpert APS, it uses below RQL to retrieve the domain listing which then displayed in the screen (this can be seen clearly in the Firebug plugin in Firefox):

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

https://***/aps/2/resources/f4aa9eaf-7106-4f68-8ae1-***/domains?limit(0,10)

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

3. As you can see above, the ID 'f4aa9eaf-7106-4f68-8ae1-***' actually refers to the account 1006*** and thus, '/domains' actually refers to all domains under this account.

4. Due to no filtration design within SpamExpert APS itself, this RQL then retrieve those domains as it is and this can be seen processed within /var/log/pa/core.log

5. You may also verify this by running curl command below which you will see that it retrieves all of the domains under this account rather than domains within subscription:

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

curl -k -E /usr/local/pem/APS/certificates/poa.pem -X GET "https://127.0.0.1:6308/aps/2/resources/f4aa9eaf-7106-4f68-8ae1-***/domains?limit(0,10)"

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

ST: #437018 (includes log details)

Internal error: APSC: Upgrade to ver. 2.0-20

Version information

2.0.15

Steps to replicate

  1. Client tries to upgrade the resource

Actual result

Internal error: APSC: Upgrade to ver. 2.0-20 : resource 488d6a59-19c9-43bc-90fd-b6d95720234b of type 'service' (http://aps.spamexperts.com/app/service/1.4) for APS application 'SpamExperts-2.0-20' : 'ignoreRemoteDomains': property is required.

Expected result

Upgrade should finish with no errors

Other notes

Whmcs: https://my.spamexperts.com/admin/supporttickets.php?action=view&id=197762

MX record set without trailing dot

Version information

Steps to replicate

Customer indicates the APS2 package is wrongly setting the MX record without trailing dot, causing issues when attempting to unprotect the domain (as the trailing dot is not returned and hence the APS2 package doesn't consider it valid). Odin support reported it's due to the following call not including the trailing dot when protecting a domain:

[root@ ~]# curl -kE /usr/local/pem/APS/certificates/poa.pem "https://127.0.0.1:6310/aps/2/resources/***" -X GET
{
       "aps":
       {
               "type": "http://parallels.com/aps/types/pa/dns/record/mx/1.0",
               "id": "***",
               "status": "aps:ready",
               "revision": 8,
               "modified": "2018-12-18T15:25:53Z",
               "subscription": "***",
               "schema": "/aps/2/types/57",
               "package":
               {
                       "id": "***",
                       "href": "***"
               }
       },
       "RRState": "active",
       "TTL": 3600,
       "source": "",
       "exchange": "mx1.spamexpertsfilter.me",
       "priority": 10,
       "recordId": 138907,
       "data": "10 mx1.spamexpertsfilter.me.",
       "sourceFQN": "example.com.",
       "zone":
       {
               "aps":
               {
                       "link": "strong",
                       "href": "/aps/2/resources/***",
                       "id": "***",
                       "subscription": "***"
               }
       },
       "replacedBy":
       {
               "aps":
               {
                       "link": "collection",
                       "href": "/aps/2/resources/***/replacedBy"
               }
       },
       "replaces":
       {
               "aps":
               {
                       "link": "collection",
                       "href": "/aps/2/resources/***/replaces"
               }
       }
}

I assume they're referring to the "exchange" variable.

Actual result

Expected result

Other notes

Domain provisoning failures showing to other users

Version information

APS 2.0-15

Steps to replicate

Unable to replicate

  1. A user logged in to OA
  2. The user tried to toggle protection for one of the email users
  3. The user received several errors related to domains that failed to provision that are unrelated to his account

Actual result

Errors messages showing domain provisioning errors unrelated to the logged in user.

Expected result

No errors to show which are not related to the logged in user.

Other notes

Ticket: #320682

Test the APS2 application compatibility with OSA 7.1

So far we used to submit our APS 2 application claiming compatibility with OSA 6 but it is reaching it's EOL (OSA 6.0.x is nearing its End Of Life at 01.08.2017). Therefore it is suggested to develop and certify packages for OSA 7.1. So we need to test our application on the latest version of the platform to see if there are compatibility issues and resubmit the package.

Version information

2.0-18

Acceptance criteria

  • We need regression tests on this
  • Any problems that we find and we need to fix them

Other notes

JS error TypeError: k is not a function

Version information

2.0-18

Steps to replicate

  1. In CCP -> Users -> Add New Service User -> Next, then don't wait until domain protection status is loaded (also reproducible if there are no protected domains) and click "Next" again. The "SE Email user won't be created." message will be shown on final screen and an error will be logged in browser console

Actual result

TypeError: k is not a function
    at c (VM1369 aps.js:111)
    at l.then.b.then (VM1369 aps.js:114)
    at VM3501 suwizard.overview.html:23
    at sa (VM1369 aps.js:19)
    at VM1369 aps.js:19
    at ta (VM1369 aps.js:19)
    at qa (VM1369 aps.js:19)
    at e (VM1369 aps.js:20)
    at VM1369 aps.js:804
    at Object.F [as init] (VM1375 i18next.js:10) "TypeError: k is not a function
    at c (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:111:423)
    at l.then.b.then (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:114:232)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/packages/35b6a53c-3844-4f21-8556-cecb7a3807d8/ui/suwizard.overview.html:23:53
    at sa (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:3)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:240
    at ta (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:125)
    at qa (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:180)
    at e (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:20:15)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:804:209
    at Object.F [as init] (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/3rd-party/i18next/i18next.js:10:203)
    ----------------------------------------
    rejected at a (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:112:313)
    at c (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:112:65)
    at l.then.b.then (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:114:232)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/packages/35b6a53c-3844-4f21-8556-cecb7a3807d8/ui/suwizard.overview.html:23:53
    at sa (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:3)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:240
    at ta (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:125)
    at qa (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:180)
    at e (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:20:15)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:804:209
    ----------------------------------------
Error
    at l.then.b.then (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:114:177)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/packages/35b6a53c-3844-4f21-8556-cecb7a3807d8/ui/suwizard.overview.html:23:53
    at sa (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:3)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:240
    at ta (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:125)
    at qa (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:19:180)
    at e (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:20:15)
    at http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:804:209
    at Object.F [as init] (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/3rd-party/i18next/i18next.js:10:203)
    at p (http://osa60.lestifeev.apsdemo.org:8080/aps/2/ui/runtime/client/aps/aps.js:804:119)"
f @ VM1369 aps.js:118
(anonymous) @ VM1369 aps.js:118
filter @ VM1369 aps.js:49
c @ VM1369 aps.js:118

Expected result

No JS errors

Aps provisioning issue: Incoming and Archiving active when they should not be active

Version information

Spamexpert version is 2.0-16
OSA version is 7.1

Steps to replicate

  1. configure a plan with autoprotect,
  2. set autoprotect domain as 0,
  3. try to protect domains

Actual result

all domains are still getting protected when subscription provisioned.

Expected result

domains should be added to the interface without the Incoming and Archiving products.

Other notes

Package failing to list correct domains for provider subscription 1

Version information

APS 2.0-15

Steps to replicate

In odin service automation there is a subscription with ID 1. This subscription is reserved for the hosting provider. It is available in hosting CP of Odin service automation. Accessing this subscription from the APS2 package doesn't work, as our APS doesn't seem to support this special subscription with ID 1. It does list some domains, but not the correct ones that are supposed to be listed.

Odin indicated:

The issue of why other service users from other customers are displayed on Hosting CP (Provider CP) for Spamexperts are due to the design of the APS applications, which do not implement proper filtering.
Since the APS is packaged by Spamexperts, please contact Spamexperts team with the description of this problem

More details are provided in an internal email thread "Modification on APS2 to be used with provider subscription 1".

Actual result

Wrong domains listed when accessing the subscriber 1 account in OA.

Expected result

Correct subscriber 1 domains showing.

Other notes

unbenannt 8

500 Internal Server Error when provisioning a context resource

A customer has just updated their APS2 installation of Spamexperts and they are now facing errors generated in POA > Tasks when trying to provision the package for any subscribers.

They followed the upgrade guide and HTTPD restarted successfully and the endpoint application also imported to POA.

The provided logs indicate the following error:

APS Application Error:
500 Internal Server Error
[Exception] Provisioning: resource c4f6e654-1467-***** of type 'context' (http://aps.spamexperts.com/app/context/2.0) for APS application 'SpamExperts-2.0-15': Internal Server Error: Only variables should be passed by reference at /var/www/html/spamexperts/context.php:258.

Body: {
"code": 500,
"error": "Exception",
"message": "Internal Server Error: Only variables should be passed by reference at /var/www/html/spamexperts/context.php:258",
"http_request": "POST /spamexperts/context to '*******'"
}

Upgrade fails from APS 2.0-10 to version 2.0-15

When trying to upgrade from APS 2.0-10 to version 2.0-15 this error occurs:

Task ID
13893964
Task name
Upgrading resources of application 'SpamExperts'
Task description
Upgrading resources of application SpamExperts 2.0-10 to version 2.0-15
Belongs to groups
2699:154194302
Parent task ID
13893963
Queue status
Failed
Start not earlier than
Jan-25-2017 20:03
Method name
taskUpgradeApp2x on SCREF:SaaSManagerTasks:0
Last execution output
Internal error: APSC: Upgrade to ver. 2.0-15 : resource 399ad95e-0941-4e38-9d38-9bd9e02beea7 of type 'service' (http://aps.spamexperts.com/app/service/1.3) for APS application 'SpamExperts-2.0-15' : The operation with name 'onContextAvailable' is not found..

Aps support suggested the isue was due to the domain example.com. The domain exists in SE, it shows in Odin as not protected. When trying to unprotect the domain and update the following error is seen:

Internal error: APSC: Upgrade to ver. 2.0-15 : resource 399ad95e-0941-4e38-9d38-9bd9e02beea7 of type 'service' (http://aps.spamexperts.com/app/service/1.3) for APS application 'SpamExperts-2.0-15' : Internal Server Error: Unknown method "onContextAvailabeSubscribe"..

APS failing to add domain if that has upper case characters

Version information

APS 2.0-19

Steps to replicate

  1. Create a domain in Odin with Upper case characters
  2. Select it in SpamExperts
  3. Select the protect option

Actual result

[2018-02-20 11:41:26] Context.WARNING: [REPORT]: Failed to add domain to SpamExperts, an issue occurred with the request. This issue that can be further investigated by your service provider via advanced logging. () [] []

Expected result

Domain should be protected.

Other notes

[2018-02-20 11:41:18] Context.INFO: updateResources: start [] [] [2018-02-20 11:41:18] Context.INFO: updateResources: Starting update process for resource () [] [] [2018-02-20 11:41:18] Context.INFO: updateResources: Protecting resource [] [] [2018-02-20 11:41:18] Context.INFO: protectResource: start [] [] [2018-02-20 11:41:18] Context.INFO: protectResource: Protection process starting [] [] [2018-02-20 11:41:19] Context.INFO: context::createSEResource: start [] [] [2018-02-20 11:41:19] Context.INFO: context::createSEResource: New SE domain resource [] [] [2018-02-20 11:41:19] Context.INFO: context::createSEResource: Linking SE domain resource to context [] [] [2018-02-20 11:41:19] Context.INFO: context::createSEResource: stop [] [] [2018-02-20 11:41:19] Context.INFO: addDomain: start [] [] [2018-02-20 11:41:26] Context.INFO: addDomain: stop [] [] [2018-02-20 11:41:26] Context.WARNING: [REPORT]: Failed to add domain to SpamExperts, an issue occurred with the request. This issue that can be further investigated by your service provider via advanced logging. () [] [] [2018-02-20 11:41:26] Context.INFO: protectResource: stop [] [] [2018-02-20 11:41:26] Context.INFO: updateResources: Check if SE resource is protected and update status [] [] [2018-02-20 11:41:27] Context.WARNING: [REPORT]: Domain exists, but the Domain user was not found in SpamExperts. The 'Protect' action may fix this for you. () [] [] [2018-02-20 11:41:27] Context.INFO: updateResources: Done! () [] [] [2018-02-20 11:41:27] Context.INFO: updateResources: stop [] []

c.o.a.service.navigation.StaticModel - Ambiguity in finding a parent

During detailed checks of the 2.0-20, an engineer from Odin has found a warning in UI log file on management node during CCPv2 navigation for Spam Experts tab:

[root@oa73a ~]# tail -fn0 /var/log/pa/pui/pui.log  | grep Ambiguity
23:53:24.794 [default task-225] WARN  c.o.a.service.navigation.StaticModel - Ambiguity in finding a parent for 'view-plugin@http://www.odin.com/oa/billing/paymentmanagement#paymentMethodSelector'. Trying to assign 'plugin-placeholder@http://www.parallels.com/ccp-billing-financial-documents#payment-method-selector' but 'plugin-placeholder@http://www.parallels.com/ccp-billing-financial-documents#payment-method-selector' is already assigned! Behavior now depends on order of elements and packages!

This means that one view plugs to several different parent elements, which is wrong according to the ambiguity warning in the following documentation section:
https://doc.apsstandard.org/7.3/concepts/frontend/navigation/index.html#static-navigation

This can cause random 404 errors when navigating the CP. It is highly recommended to fix this issue in next application update.

Version information

2.0-20

Steps to replicate

  1. Make some navigation between CCPv2 pages for Spam Experts tab
  2. Check the log file

Actual result

The contains an error message

Expected result

No error messages

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.