mirror of
https://github.com/sasjs/core.git
synced 2026-01-05 00:20:05 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8d3b43b12 | ||
|
|
32a6d15c2e | ||
|
|
b109e7cead | ||
| d291d3e287 |
30
.github/vpn/config.ovpn
vendored
Normal file
30
.github/vpn/config.ovpn
vendored
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
cipher AES-256-CBC
|
||||||
|
setenv FORWARD_COMPATIBLE 1
|
||||||
|
client
|
||||||
|
server-poll-timeout 4
|
||||||
|
nobind
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
remote vpn.analytium.co.uk 443 tcp
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
remote vpn.analytium.co.uk 1194 udp
|
||||||
|
dev tun
|
||||||
|
dev-type tun
|
||||||
|
ns-cert-type server
|
||||||
|
setenv opt tls-version-min 1.0 or-highest
|
||||||
|
reneg-sec 604800
|
||||||
|
sndbuf 0
|
||||||
|
rcvbuf 0
|
||||||
|
# NOTE: LZO commands are pushed by the Access Server at connect time.
|
||||||
|
# NOTE: The below line doesn't disable LZO.
|
||||||
|
comp-lzo no
|
||||||
|
verb 3
|
||||||
|
setenv PUSH_PEER_INFO
|
||||||
|
|
||||||
|
ca ca.crt
|
||||||
|
cert user.crt
|
||||||
|
key user.key
|
||||||
|
tls-auth tls.key 1
|
||||||
33
.github/workflows/run-tests.yml
vendored
33
.github/workflows/run-tests.yml
vendored
@@ -21,6 +21,31 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
|
- name: Write VPN Files
|
||||||
|
run: |
|
||||||
|
echo "$CA_CRT" > .github/vpn/ca.crt
|
||||||
|
echo "$USER_CRT" > .github/vpn/user.crt
|
||||||
|
echo "$USER_KEY" > .github/vpn/user.key
|
||||||
|
echo "$TLS_KEY" > .github/vpn/tls.key
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
CA_CRT: ${{ secrets.CA_CRT}}
|
||||||
|
USER_CRT: ${{ secrets.USER_CRT }}
|
||||||
|
USER_KEY: ${{ secrets.USER_KEY }}
|
||||||
|
TLS_KEY: ${{ secrets.TLS_KEY }}
|
||||||
|
|
||||||
|
- name: Install Open VPN
|
||||||
|
run: |
|
||||||
|
sudo apt install apt-transport-https
|
||||||
|
sudo wget https://swupdate.openvpn.net/repos/openvpn-repo-pkg-key.pub
|
||||||
|
sudo apt-key add openvpn-repo-pkg-key.pub
|
||||||
|
sudo wget -O /etc/apt/sources.list.d/openvpn3.list https://swupdate.openvpn.net/community/openvpn3/repos/openvpn3-bionic.list
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install openvpn3
|
||||||
|
|
||||||
|
- name: Start Open VPN 3
|
||||||
|
run: openvpn3 session-start --config .github/vpn/config.ovpn
|
||||||
|
|
||||||
- name: Install Doxygen
|
- name: Install Doxygen
|
||||||
run: sudo apt-get install doxygen
|
run: sudo apt-get install doxygen
|
||||||
|
|
||||||
@@ -31,16 +56,16 @@ jobs:
|
|||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
- name: Add client
|
- name: Add client
|
||||||
run: echo "CLIENT=${{secrets.CLIENT}}"> .env.viya
|
run: echo "CLIENT=${{secrets.CLIENT}}"> .env.viya
|
||||||
|
|
||||||
- name: Add secret
|
- name: Add secret
|
||||||
run: echo "SECRET=${{secrets.SECRET}}" >> .env.viya
|
run: echo "SECRET=${{secrets.SECRET}}" >> .env.viya
|
||||||
|
|
||||||
- name: Add access token
|
- name: Add access token
|
||||||
run: echo "ACCESS_TOKEN=${{secrets.ACCESS_TOKEN}}" >> .env.viya
|
run: echo "ACCESS_TOKEN=${{secrets.ACCESS_TOKEN}}" >> .env.viya
|
||||||
|
|
||||||
- name: Add refresh token
|
- name: Add refresh token
|
||||||
run: echo "REFRESH_TOKEN=${{secrets.REFRESH_TOKEN}}" >> .env.viya
|
run: echo "REFRESH_TOKEN=${{secrets.REFRESH_TOKEN}}" >> .env.viya
|
||||||
|
|
||||||
- name: Build Project
|
- name: Build Project
|
||||||
run: npm run build
|
run: npm run build
|
||||||
|
|||||||
95
all.sas
95
all.sas
@@ -12703,98 +12703,6 @@ data _null_;
|
|||||||
run;
|
run;
|
||||||
|
|
||||||
%mend;/**
|
%mend;/**
|
||||||
@file
|
|
||||||
@brief Get metadata permissions for a particular folder
|
|
||||||
@details Uses the metadata batch tools to fetch the permissions for a
|
|
||||||
particular folder. For security, the username / password are expected to have
|
|
||||||
been provided in a protected directory.
|
|
||||||
|
|
||||||
Usage:
|
|
||||||
|
|
||||||
%* import the macros (or make them available some other way);
|
|
||||||
filename mc url "https://raw.githubusercontent.com/sasjs/core/main/all.sas";
|
|
||||||
%inc mc;
|
|
||||||
|
|
||||||
%* create sample text file as input to the macro;
|
|
||||||
%* password must be in single quotes if it has special chars;
|
|
||||||
|
|
||||||
filename creds temp;
|
|
||||||
data _null_;
|
|
||||||
file creds;
|
|
||||||
put " -user 'sasdemo' -password 'Mars321' ";
|
|
||||||
run;
|
|
||||||
|
|
||||||
filename outref "%sysfunc(pathname(work))";
|
|
||||||
%mmx_getmetaperms(
|
|
||||||
metaloc=/some/meta/folder
|
|
||||||
,secureref=creds
|
|
||||||
,outds=work.perms
|
|
||||||
)
|
|
||||||
|
|
||||||
<h4> SAS Macros </h4>
|
|
||||||
@li mf_loc.sas
|
|
||||||
@li mf_getuniquefileref.sas
|
|
||||||
@li mp_abort.sas
|
|
||||||
|
|
||||||
@param metaloc= the metadata folder for which to export permissions
|
|
||||||
@param secureref= fileref containing the username / password (should point to
|
|
||||||
a file in a secure location)
|
|
||||||
@param outds= (work.mmx_getmetaperms) The output table containing the perms
|
|
||||||
@param effective= (YES) Displays effective access. If set to NO, only direct
|
|
||||||
access controls are displayed. Effective access is the net effect of all
|
|
||||||
applicable permission settings (both direct access controls and inherited
|
|
||||||
permissions).
|
|
||||||
@param onlyGroup= (0) Display access for only the specified user group.
|
|
||||||
@param onlyUser= (0) Display access for only the specified user.
|
|
||||||
|
|
||||||
@version 9.4
|
|
||||||
@author Allan Bowe
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
%macro mmx_getmetaperms(metaloc=
|
|
||||||
,secureref=
|
|
||||||
,outds=work.mmx_getmetaperms
|
|
||||||
,effective=YES
|
|
||||||
,onlygroup=0
|
|
||||||
,onlyuser=0
|
|
||||||
);
|
|
||||||
|
|
||||||
%local host port path mmxuser mmxpass eff filt;
|
|
||||||
%let host=%sysfunc(getoption(metaserver));
|
|
||||||
%let port=%sysfunc(getoption(metaport));
|
|
||||||
%let path=%mf_loc(POF)/tools/sas-show-metadata-access;
|
|
||||||
|
|
||||||
%if &effective=YES %then %let eff=-effective;
|
|
||||||
%if "&onlygroup" ne "0" %then %let filt=-onlyGroup ""&onlygroup"";
|
|
||||||
%else %if "&onlyuser" ne "0" %then %let filt=-onlyUser ""&onlyuser"";
|
|
||||||
|
|
||||||
%local fref1;
|
|
||||||
%let fref1=%mf_getuniquefileref();
|
|
||||||
data _null_;
|
|
||||||
file &fref1 lrecl=32767;
|
|
||||||
infile &secureref;
|
|
||||||
input;
|
|
||||||
put 'data _null_;';
|
|
||||||
put "infile '&path -disableX11 -host &host -port &port " _infile_ @;
|
|
||||||
put " ""&metaloc"" &eff &filt 2>&1' pipe lrecl=10000;";
|
|
||||||
put 'input;putlog _infile_;run;';
|
|
||||||
run;
|
|
||||||
|
|
||||||
data _null_;
|
|
||||||
infile &fref1;
|
|
||||||
input;list;run;
|
|
||||||
|
|
||||||
%inc &fref1/nosource;
|
|
||||||
|
|
||||||
|
|
||||||
%mp_abort(iftrue= (&syscc ne 0)
|
|
||||||
,mac=&sysmacroname
|
|
||||||
,msg=%str(syscc=&syscc on exit)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
%mend mmx_getmetaperms;/**
|
|
||||||
@file mmx_spkexport.sas
|
@file mmx_spkexport.sas
|
||||||
@brief Exports everything in a particular metadata folder
|
@brief Exports everything in a particular metadata folder
|
||||||
@details Will export everything in a metadata folder to a specified location.
|
@details Will export everything in a metadata folder to a specified location.
|
||||||
@@ -13081,7 +12989,8 @@ run;
|
|||||||
filename &fref filesrvc
|
filename &fref filesrvc
|
||||||
folderPath="&path"
|
folderPath="&path"
|
||||||
filename="&name"
|
filename="&name"
|
||||||
cdisp="&contentdisp";
|
cdisp="&contentdisp"
|
||||||
|
lrecl=1048544;
|
||||||
|
|
||||||
%mp_binarycopy(inref=&inref, outref=&fref)
|
%mp_binarycopy(inref=&inref, outref=&fref)
|
||||||
|
|
||||||
|
|||||||
2417
package-lock.json
generated
2417
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -33,7 +33,6 @@
|
|||||||
"postinstall": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true"
|
"postinstall": "[ -d .git ] && git config core.hooksPath ./.git-hooks || true"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sasjs/cli": "^2.22.2"
|
"@sasjs/cli": "^2.27.0"
|
||||||
},
|
}
|
||||||
"dependencies": {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,8 @@
|
|||||||
filename &fref filesrvc
|
filename &fref filesrvc
|
||||||
folderPath="&path"
|
folderPath="&path"
|
||||||
filename="&name"
|
filename="&name"
|
||||||
cdisp="&contentdisp";
|
cdisp="&contentdisp"
|
||||||
|
lrecl=1048544;
|
||||||
|
|
||||||
%mp_binarycopy(inref=&inref, outref=&fref)
|
%mp_binarycopy(inref=&inref, outref=&fref)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user