How to integrate Zatca Fatoora Portal Phase 2 with Dynamics AX or D365? - sdk

I have implemented Zatca's phase 1 Generation phase (KSA) and now I am working on implementing Phase 2 but I am confused about how to create Invoice XML file, get UUID, Hash Value, and what should be the complete pattern of the Invoice XML file.
Can anyone please tell me step by step how to implement Zatca Phase 2 with Dynamics AX 2012 or D365?

First download these tools https://sandbox.zatca.gov.sa/downloadSDK
Then follow this brochure
https://sandbox.zatca.gov.sa/20220623_Developer%20Portal%20User%20Manual_vF.pdf
Read on until another time they have technical linking problems I don't advise you to take the risk, their libraries are sterile and impractical (:
The security processes on the invoice are incorrect and the certificate on his signature has expired since 2021

Related

Signing Code (windows binaries) platform for systemhouse

We are signing our code (windows binaries) with key signed by trusted CA.
I don't like the idea that every developer has the crt+key and there is no control what has been signed. I also don't like the idea of CI (jenkins) that auto signs every binary.
I'm looking for a centralized solution to sign code with auditing (so I will know what and by who has been signed). Perfect would be to have a way that requires ACK from at least two members of managers group.
How that process is organized in your companies? What is the proper solution backed by best practices?
You can maintain a list in any SCM to track which files you're signing, and using git even makes it easier to see who added files to the list. working with pull requests will solve your acknowledge issue and any scripting language can easily solve your issue with a simple wrapper on your code signing service.

How to version assemblies—pre-build—based on work items

I'd like to automatically increment my assembly versions based on this ruleset:
Revision is always 0
Build is incremented when the only WIT in the release is a Bug fix
Minor is incremented when the release contains any WIT other than a Bug fix; Build is then always set to 0
Major is never automatically incremented
Naturally this will require a build step that can interact in some way with the project.
My first thought was to build a small Windows Service that utilizes the TFS SDK to construct the version number based on these rules and return it via a WCF call, etc. But I run into a problem there with a business requirement that all code and functionality must be replicated into a VSTS project as well (the customer owns the code and must be able to proceed without me). There's no installing such a service there, of course.
I then considered installing the service on his server, in turn making it available to VSTS. This would pass the Rube Goldberg test with flying colors.
Is there an easier way of accomplishing this task? One that can work in both environments?
EDIT
I found this, but it's doubtful that the TFS SDK is registered in the GAC for VSTS.
Can someone confirm? Is the TFS SDK available to build scripts running on VSTS?
Well now that didn't take long.
I found this and this for using PowerShell to query the REST API. No GAC/SDK needed.
-- EDIT -----------------
I've intentionally excluded content from the pages behind these links as the solutions provided are exceedingly complex; it's not possible to cover the concepts here in a single post. In case the pages disappear or the URLs change, here are the links at archive.org:
1. PowerShell and vNext Builds
2. VSTS/TFS REST API: The basics and working with builds and releases
In any case, the concept is popular and well-covered—in the event these two become inaccessible, there are many others available on the same subject matter. As quickly as I found these, someone could find more.

HP Quality Center

I am investigating a way to automate some of our build processes using Jenkins and HPQC. Currently, we have a process where, once a change to fix a defect has been checked in we set its status to "Fixed" and then reassign defect in HPQC from the individual developers to a team lead.
The team lead is tasked with manually deploying a build for the deliverable to the test environment and when he does this he will then update all of the defects assigned to him this way reassigning them to the test lead, who can assign them to individual testers.
I would like to automate this process where I can. Does HPQC have a web API of some kind? So that a remote system (such as a Jenkins build server) could run a post-build action script to gather a bunch of defect numbers (those included in the build) find each defect in HPQC and then update its status and owner?
There is a REST API for ALM / Quality Center, info is accessible:
http://support.openview.hp.com/selfsolve/manuals
You will have to sign up for an account with HP to access it. Ugh, troglodytes.
Search for "ALM REST API", download and read the newest guide and reference for your version of QC.
(We also use QC at my work. It's pretty damn bad. I should try and convince them to get or build something better.)
The answer above is a good one, I found the reference he mentions, but making use of that is not very intuitive, probably because I am such a newb. For my fellow unenlightened you might want to use another reference I found for how to use the reference :
http://www.consulting-bolte.de/index.php/22-hp-alm/hp-alm-rest-api/115-connect-to-hp-alm-via-java-using-rest-api
The key piece of information for me was that inside all of these class files they give you in the "Example Applications" folder there is a reference to a package :
package org.hp.qc.web.restapi.docexamples.docexamples.infrastructure;
This is just another name for all the files located in the guide in the "infrastructure" subfolder. You do not need to go find this out on github or something.

Huge security risk using TFS build system

turns out that tfs build system always use the same Build Account to get the latest source code and do the build job. And this account has the highest permission to access all the source code.
So anyone who has just one single team project build permission can actually get the source code of all team projects by creating a build definition, and set 'Source Setting' to root of TeamProjectCollection, then in MSBuild post event, do 'XCopy' to move the source code to any remote server.
The build server is associated on a team project basis. Allowing multiple projects to use the same build server is an implementation decision not an inherent security flaw, if security segregation is important use multiple build servers with different accounts. For Team build account to team project setup details see http://msdn.microsoft.com/en-us/library/ms253062(v=vs.90).aspx
This is by design. And it's bad :(
From the docs of microsoft, they tell you , that a developer is seen as a trusted entity. That's their rationale:
Installing Team Foundation Build Service increases the attack surface of the computer. Because developers are treated as trusted entities in the build system, a malicious user could, for example, construct a build definition to run arbitrary code that is designed to take control of the server and steal data from Team Foundation Server. Customers are encouraged to follow security best practices as well as deploy defense in-depth measures to ensure that their build environment is secure. This includes developer workstations. For more information regarding security best practices, see the TechNet Article Security Guidance.
Here is the original article.
So when using a build server, you're always at risk!
As I mentioned in a comment. I wrote a lot of server side plugins and so on to secure the tfs environment of a large company. It's a lot of work to get a tfs build environment secure.
A solution is to revoke the privilege to create and edit Build Definitions so you have a strict control on which build is run where.

Is it possible to set up continuous integration for MS dynamics crm 2011?

We are just beginning development and implementation for dynamics crm 2011 on premises. Is it possible to implement automation for code check-in to promote code from development to test systems? It looks like this would involve export/import of unmanaged solutions containing the development code that was checked in. I have not been able to find APIs around this functionality.
If that is not possible, how close can you get? It looks like there are APIs to automate the uploading of web resources and plug-ins (e.g. webresourceutility in the sdk), but the web resources still need to be manually linked to the form they are to be used on (in the case of javascript etc). Has anyone made progress in automating parts of their CRM environments?
for reference, we're using vs 2010 & tfs 2010 using MSuild for current continuous integration.
We have a few techniques that provides us a very solid CI structure.
Plugins
All our Plugins are CI Compiled on Check-In
All plugin code we write has self-registration details as part of the component.
We have written a tool which plays the Plugins to the database, uninstalling the old ones first based on the self-registration
details.
Solution
We have an unmanaged solution in a Customisation organisation which
is clean and contains no data. Development is conducted out of this
organisation. It has entities, forms, Jscript, Views, Icons, Roles,
etc.
This Customisation database has all the solutions we've imported from 3rd parties, and customisations are made into our solution which is the final import into a destination organisation.
The Solution is exported as managed and unmanaged and saved into
TFS
We store the JScript and SSRS RDLs in TFS and have a custom tool
which plays these into the customisation database before it is
exported.
We also have a SiteMap unmanaged Solution which is exported as unmanaged (to ensure we get a final resultant Sitemap we are after)
Deployment
We have a UI and Command Line driven tool which does the following :-
Targets a particular Organisation
Imports the Customisation managed solution into a selected environment. e.g. TEST. Additionally imports the unmanaged Sitemap.
Uninstalls the existing solution which was there (we update the solution.xml file giving it a name based on date/time when we import)
Installs/Uninstalls the Plugin Code
Installs any custom SQL scripts (for RDLs)
Re-enables Duplicate Detection Rules
Plays in certain meta-data we store under source control. e.g. Custom Report entity we built which has attachments and XML configuration.
It isn't entirely perfect, but via command line we refresh TEST and all the Developer PCs nightly. It takes about 1 hour to install and then uninstall the old solution per organisation.
We use CI extensively for Dynamics CRM. For managing solutions, I would recommend using a "clean" Dynamics CRM implementation which will be the master for your solutions and also for your "domain data". See http://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.importsolutionrequest.aspx for importing solutions. Also check out - http://msdn.microsoft.com/en-us/library/hh547388.aspx

Resources