Write a web frontend for artifactory [closed] - artifactory

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 months ago.
This post was edited and submitted for review 3 months ago and failed to reopen the post:
Not suitable for this site We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Improve this question
I need help to choose tools to create a web frontend for Jfrog Artifactory. It has a web ui, but it is not easy to use out of the box.
What I need, is to be able to create a simple webpage where "customers" can search out software, by enabling different properties on the artifacts.
Ex. if the CODESYS feature is desired, then it can be selected from a drop down box.
Product owner should also be able to mark releases available to external customers.
What tools should I use to be doing that?
Does Artifactory have tools to do this? '
Can I write a web page which does queries against Artifactory.
and if so what frameworks can be used
Or something else

You could leverage the jfrog-client-js
https://github.com/jfrog/jfrog-client-js
First you instantiate the client and get the object (jfrogClient in the case below)
let jfrogClient = new JfrogClient({
platformUrl: 'https://my-platform-url.jfrog.io/',
// artifactoryUrl - Set to use a custom Artifactory URL.
// xrayUrl - Set to use a custom Xray URL.
username: 'username',
password: 'password',
// OR
accessToken: 'accessToken',
// Optional parameters
proxy: { host: '<organization>-xray.jfrog.io', port: 8081, protocol: 'https' },
headers: { key1: 'value1', key2: 'value2' },
// Connection retries. If not defined, the default value is 3.
retries: 3,
});
Next, you use this object (jfrogClient) to interact with your Artifactory
jfrogClient.artifactory()
.search()
.aqlSearch(
'items.find({' +
'"repo":"my-repo-name",' +
'"path":{"$match":"*"}}' +
').include("name","repo","path","created").sort({"$desc":["created"]}).limit(10)'
);
.then(result => {
console.log(JSON.stringify(result));
})
.catch(error => {
console.error(error);
});
The above code will return an array of your search results, which you will then send to your web UI for display.

Related

Firestore can't be updated manually in the console and with Js [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have a firbebase project and since today I can't edit it with code and manually in the firebase console.
Here is an image of the structure of the project: https://i.stack.imgur.com/Qe1Nv.png
I use the following code to write usernames to a document in the firestore:
const auth = firebase.auth();
const db = firebase.firestore();
db.collection("users_information").doc("a_document").update({
"username": "some username"
})
but it throws this error: https://i.stack.imgur.com/p5H60.png
If I try to edit or delete the documents in the console the following error comes up:
Translation in English: The field couldn't be saved
Does anybody have an idea why this happens?
It could be an issue with the rules but I don't think so:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write: if true;
}
}
}
Yes I know the rules are very weak but I am still developing. I have also heard often, that firebase sometimes diables a service if weak rules are public too long. But if that happens you receive an email and I didn't.
I hompe you can help me ^^
Edit:
I just received an email from Firebase, that there was a server issue. It wasn't my fault and it works again now.
This is an issue within your Firebase Project, This is what happens when either your rules are left public too long or there is a server outage. Firestore can no longer be read or written until it has been resolved.
Double-check your Firestore rules are secure and if problems persist, please contact Firebase Support

What to use to check Expiry in JWT [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
newbie in JWT and AzureAD. Say, I received the JWT from Azure as below:
Problem:
1) WHAT To use to handle this JWT
2) How to access the exp in JWT.
3) what this number 1516890687 means and How to handle it
{
"aud": "https://graph.microsoft.com",
"iss": "https://sts.windows.net/xxx-xxx-xxx-xxx-xxx/",
"iat": 1516886787,
"nbf": 1516886787,
"exp": 1516890687,
"aio": "Y2NgYEjJXXXXXXXXXXXXXX=",
"app_displayname": "XXXXXXXX",
"appid": "xxx-xxx-xxxx-xxxx-xxxx",
"appidacr": "2",
"e_exp": 262800,
....
}
Thanks.
Microsoft Authentication Library (MSAL)
Using MSAL it is quite easy: authenticationResult.ExpiresOn
Using MSAL you will not have to handle it manually. Otherwise it is a unix timestamp, so 1516890687 is 01/25/2018 # 2:31pm (UTC).

How to decode encrypted wordpress admin password? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I forgot my WordPress admin password, and I see it in the phpMyAdmin file.
But it is in a different form.
How I can decode it to know what my password is?
Is there any tool for decoding passwords?
$P$BX5675uhhghfhgfhfhfgftut/0
Help me.
You can't easily decrypt the password from the hash string that you see. You should rather replace the hash string with a new one from a password that you do know.
There's a good howto here:
https://jakebillo.com/wordpress-phpass-generator-resetting-or-creating-a-new-admin-user/
Basically:
generate a new hash from a known password using e.g. http://scriptserver.mainframe8.com/wordpress_password_hasher.php, as described in the above link, or any other product that uses the phpass library,
use your DB interface (e.g. phpMyAdmin) to update the user_pass field with the new hash string.
If you have more users in this WordPress installation, you can also copy the hash string from one user whose password you know, to the other user (admin).
just edit wp_user table with your phpmyadmin, and choose MD5 on Function field then input your new password, save it (go button).
MD5 encrypting is possible, but decrypting is still unknown (to me). However, there are many ways to compare these things.
Using compare methods like so:
<?php
$db_pass = $P$BX5675uhhghfhgfhfhfgftut/0;
$my_pass = "mypass";
if ($db_pass === md5($my_pass)) {
// password is matched
} else {
// password didn't match
}
Only for WordPress users.
If you have access to your PHPMyAdmin, focus you have because you paste that hashing here: $P$BX5675uhhghfhgfhfhfgftut/0, WordPress user_pass is not only MD5 format it also uses utf8_mb4_cli charset so what to do?
That's why I use another Approach if I forget my WordPress password I use
I install other WordPress with new password :P, and I then go to PHPMyAdmin and copy that hashing from the database and paste that hashing to my current PHPMyAdmin password ( which I forget )
EASY is use this :
password = "ARJUNsingh#123"
password_hasing = " $P$BDSdKx2nglM.5UErwjQGeVtVWvjEvD1 "
Replace your $P$BX5675uhhghfhgfhfhfgftut/0 with my
$P$BDSdKx2nglM.5UErwjQGeVtVWvjEvD1
I USE THIS APPROACH FOR MY SELF WHEN I DESIGN THEMES AND PLUGINS
WORDPRESS USE THIS
https://developer.wordpress.org/reference/functions/wp_hash_password/

Contact 7 form email not received in outlook.com [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
The contact 7 form in one of wordpress website is configured to send email to an account created in outlook.com
The form on submission shows success message but the message is never received in my outlook account.
Setting the recipient email to any gmail account works fine as email is received successfully.
Please suggest any possible solution for this.
I had the exact same problem, and emails never even reached the junk folder, they just never arrived. Here is what I did:
In outlook.com:
In your account -> click the settings gear -> More mail settings -> Safe and blocked senders -> safe senders.
Add your domain: example.com
For hostname it wont be white listed automatically so add it as well: yourhost.example.com
PHP:
Make sure your $senderEmail (that is attached to the $headers) is within the safe sender you have added.
$headers = "From: " . $senderName . " <" . $senderEmail . ">";
$success = mail( $recipient, EMAIL_SUBJECT, $message, $headers );
This made it go straight to inbox.
Hope this helps.
EDIT:
It may also be far easier and productive to use a 3rd party service such as SendGrid or MailGun since directly meddling with email and servers configurations could be a major time sink.

Configure Mail Server to receive mail from any domain [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have a postfix mail server on ubuntu on my virtualbox,now the domain of the mail server is abc.com...hence it receives mail from any "from address" but the "to address" needs to be proper i.e a valid user in the mailserver.
Now,in my project i am sending fake mails to user whose mail id consists of other domains too...like cde.com
My final objective is to show the mails in the mail server.
When i tried that ,it goes directly in to the mailserveer logs i.e /var/log/mail.log i.e as an error
is there any way i can store these mails in the mailserver??
You want not only a Catch-All configuration like accepting any mail to *#abc.com but also to have a Catch-Anything configuration to accept any mail to *#* ?
This is possible if you have the PCRE support compiled into Postfix. Then you need virtual users in your configuration (see the Posfix documentation) and tweak it as follows:
Make sure that your Postfix is already configured to accept mail for at least one user and one domain. And that this is tested.
1) In main.conf set
virtual_alias_domains =
virtual_alias_maps = hash:/etc/postfix/virtual_forwardings, pcre:/etc/postfix/virtual_forwardings.pcre
virtual_mailbox_domains = hash:/etc/postfix/virtual_domains, pcre:/etc/postfix/virtual_domains.pcre
The hash: parts are the known from the docs. And the pcre: parts are new.
The hash: parts can also be omitted.
2) Create the file virtual_domains.pcre with the following content:
/^.*/ OK
This accepts any domain as valid recipient domain.
3) Create the file virtual_forwardings.pcre with the following content:
/#.*/ someuser#example.com
This forwards any local part of any domain to the Postfix user someuser#example.com. Make sure that this is a valid virtual or local user.
In this configuration it seems that Postfix is an Open Relay, but it does not relay for other domains. It accepts mails for any domain and locally delivers the mail to one mailbox.
Sometimes you will then notice a log entry telling you something like "don't list abc.com in mydestination and virtual config". This warning can be ignored as this "strange" setup is not usual.
FTR:
An alternative way to do it by sending any mail to "some.local.user" (a shell user)
Required: postfix-pcre package
in main.cf
luser_relay = some.local.user
local_recipient_maps =
virtual_alias_maps = pcre:/etc/postfix/virtual_alias.pcre
mydestination = $myhostname, pcre:/etc/postfix/mydestination.pcre
File: /etc/postfix/virtual_alias.pcre
(catchall mapped to "some.local.user")
/\/#/ some.local.user
__
File: /etc/postfix/mydestination.pcre (we accept whatever you throw at us)
/.*/ OK

Resources