WebSphere Commerce 7 | REST | Basic Authentication | How to validate Basic Authentication from REST Browser Plugins & Applications?

If third party vendor is calling your REST Service then user details has provided in the following way,

a. Calling REST Service tools/plugins available with Browsers (Eg: REST Client)
    1. Click on Authentication


    2. Provide Username & Password in the Basic Authentication


    3. REST Client Plugin will automatically convert this to Encoded Credentials format,


b. Using Application,
    1. The user name and password are combined into a string called username:password. User names and passwords that contain a colon character (:) are not supported.
    2. The resulting string literal is then encoded using the RFC2045-MIME variant of Base64, except it is not limited to 76 characters per line.
    3. The authorization method and a space is then put before the encoded string. For example, Basic
        For example, if the user agent uses Aladdin as the user name and open sesame as the password, the header is formed in the following way:
        Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==

If you pass these credentials in these formats, automatically WebSphere Commerce will validate the user credentials from USERREG Tables and error will be thrown if the credentials are not valid.

WebSphere Commerce 7 | Solr | Preprocess Command failed to run | Queries to find the Data Issues

You might have noticed Solr Preprocess might have failed because of the Data issues in the Master Catalog.

Here are the few queries to check the Data Issues in the Master Catalog and making the Solr Preprocess to fail,

Query 1:  Same Products/SKUs has been assigned to Multiple Catalog Groups in the Master Catalog,
select catentry_id, (select partnumber from catentry where catentry_id = c.catentry_id) partnumber,
        catgroup_id, (select identifier from catgroup where catgroup_id = c.catgroup_id) catgroup_identifier
from catgpenrel c
where catentry_id in
        (select catentry_id
        from catgpenrel
        where catalog_id = 10001
        group by catentry_id
        having count(catentry_id) > 1
        )


Query 2:  One Category is assigned with multiple Categories in the Master Catalog

select catentry_id, catgroup_id
from catgpenrel
where catentry_id in
    (select catentry_id from catgpenrel where catalog_id = 10001
        group by catentry_id having count(catentry_id) > 1
    )


Query 3:  One SKU assigned to multiple Parent Products in the Master Catalog
select child_catentry_id, count(catentry_id_parent) parents_count from (
select c1.partnumber as parent_partnumber, c1.catentry_id as catentry_id_parent,
c2.partnumber as child_partnumber, c2.catentry_id as child_catentry_id, cgr.catalog_id
from catentry c1, catentry c2, catentrel cr, catgpenrel cgr
where c1.catentry_id = cr.catentry_id_parent
and c2.catentry_id = cr.catentry_id_child
and cgr.catentry_id = c1.catentry_id
and cgr.catalog_id = 10001
and c1.markfordelete = 0
and c1.buyable = 1)
group by child_catentry_id
having count(catentry_id_parent) > 1


Query 4:  SKU (Item) assigned as Child to one Parent Product and also marked as Parent to another Child
select catentry_id, partnumber, c2.catentry_id_child as markedasparent
from catentry c1, catentrel c2
where c1.catentry_id = c2.catentry_id_parent
and catenttype_id = 'ItemBean'


Query 5:  Product assigned as Child to another Product
select catentry_id, partnumber, c2.catentry_id_parent as markedaschild
from catentry c1, catentrel c2
where c1.catentry_id = c2.catentry_id_child
and catenttype_id = 'ProductBean'

My Writings........

HCL Commerce v9.1 | Local Store Vs Remote Store

  Local Store Remote Store Project Type Migrated (Lift & Shift) - Newly Imp...